Commit 0287d5c5 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 71c149b9
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment