diff options
author | Johan Hovold <jhovold@gmail.com> | 2014-05-26 13:23:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-27 18:04:04 -0400 |
commit | 40d88983cee801cb9aef00e514b3ebf3a51f6c7e (patch) | |
tree | 812d09d5b4cda1d0d168056f9e5e457024553a8d /drivers/usb/serial/sierra.c | |
parent | e825aaa0624ef5cc0aa06e3102ddfc9ed95c2e2c (diff) |
USB: sierra: remove disconnected test from close
Remove no longer needed disconnected test from close, which is never
called post disconnect (and drivers must handle failed I/O during
disconnect anyway).
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 854ac61581ba..74b417c91e30 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -772,16 +772,12 @@ static void sierra_close(struct usb_serial_port *port) | |||
772 | portdata->rts_state = 0; | 772 | portdata->rts_state = 0; |
773 | portdata->dtr_state = 0; | 773 | portdata->dtr_state = 0; |
774 | 774 | ||
775 | mutex_lock(&serial->disc_mutex); | 775 | /* odd error handling due to pm counters */ |
776 | if (!serial->disconnected) { | 776 | if (!usb_autopm_get_interface(serial->interface)) |
777 | /* odd error handling due to pm counters */ | 777 | sierra_send_setup(port); |
778 | if (!usb_autopm_get_interface(serial->interface)) | 778 | else |
779 | sierra_send_setup(port); | 779 | usb_autopm_get_interface_no_resume(serial->interface); |
780 | else | ||
781 | usb_autopm_get_interface_no_resume(serial->interface); | ||
782 | 780 | ||
783 | } | ||
784 | mutex_unlock(&serial->disc_mutex); | ||
785 | spin_lock_irq(&intfdata->susp_lock); | 781 | spin_lock_irq(&intfdata->susp_lock); |
786 | portdata->opened = 0; | 782 | portdata->opened = 0; |
787 | if (--intfdata->open_ports == 0) | 783 | if (--intfdata->open_ports == 0) |