提交 40d88983 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

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: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e825aaa0
......@@ -772,16 +772,12 @@ static void sierra_close(struct usb_serial_port *port)
portdata->rts_state = 0;
portdata->dtr_state = 0;
mutex_lock(&serial->disc_mutex);
if (!serial->disconnected) {
/* odd error handling due to pm counters */
if (!usb_autopm_get_interface(serial->interface))
sierra_send_setup(port);
else
usb_autopm_get_interface_no_resume(serial->interface);
/* odd error handling due to pm counters */
if (!usb_autopm_get_interface(serial->interface))
sierra_send_setup(port);
else
usb_autopm_get_interface_no_resume(serial->interface);
}
mutex_unlock(&serial->disc_mutex);
spin_lock_irq(&intfdata->susp_lock);
portdata->opened = 0;
if (--intfdata->open_ports == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册