summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2014-05-26 19:23:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-27 15:04:05 -0700
commit0287d5c5cda82ebe87e79e5a298f40f0ca05e5ef (patch)
tree7a3ef2a732b96c4c709cad470cd40bf121761993 /drivers/usb/serial
parent71c149b901e367db5dae1ec83bb82d14d01ad4cb (diff)
USB: sierra: minimise no-suspend window during close
Move usb_autopm_get_interface_no_resume to the end of close(). This makes the window during which suspend is prevented before the final put in USB serial core slightly smaller. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/sierra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 967331964f36..be4a759b3aed 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -769,8 +769,6 @@ static void sierra_close(struct usb_serial_port *port)
portdata = usb_get_serial_port_data(port);
- usb_autopm_get_interface_no_resume(serial->interface);
-
spin_lock_irq(&intfdata->susp_lock);
portdata->opened = 0;
if (--intfdata->open_ports == 0)
@@ -796,6 +794,8 @@ static void sierra_close(struct usb_serial_port *port)
sierra_release_urb(portdata->in_urbs[i]);
portdata->in_urbs[i] = NULL;
}
+
+ usb_autopm_get_interface_no_resume(serial->interface);
}
static int sierra_open(struct tty_struct *tty, struct usb_serial_port *port)