USB: usb_wwan: remove bogus disconnect test in close
Remove bogus (and unnecessary) test for serial->dev being NULL in close. The device is never cleared, and close is never called after a completed disconnect anyway. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9c210bfa29
commit
e6d144bc27
1 changed files with 12 additions and 13 deletions
|
@ -421,7 +421,6 @@ void usb_wwan_close(struct usb_serial_port *port)
|
||||||
|
|
||||||
portdata = usb_get_serial_port_data(port);
|
portdata = usb_get_serial_port_data(port);
|
||||||
|
|
||||||
if (serial->dev) {
|
|
||||||
/* Stop reading/writing urbs */
|
/* Stop reading/writing urbs */
|
||||||
spin_lock_irq(&intfdata->susp_lock);
|
spin_lock_irq(&intfdata->susp_lock);
|
||||||
portdata->opened = 0;
|
portdata->opened = 0;
|
||||||
|
@ -431,10 +430,10 @@ void usb_wwan_close(struct usb_serial_port *port)
|
||||||
usb_kill_urb(portdata->in_urbs[i]);
|
usb_kill_urb(portdata->in_urbs[i]);
|
||||||
for (i = 0; i < N_OUT_URB; i++)
|
for (i = 0; i < N_OUT_URB; i++)
|
||||||
usb_kill_urb(portdata->out_urbs[i]);
|
usb_kill_urb(portdata->out_urbs[i]);
|
||||||
|
|
||||||
/* balancing - important as an error cannot be handled*/
|
/* balancing - important as an error cannot be handled*/
|
||||||
usb_autopm_get_interface_no_resume(serial->interface);
|
usb_autopm_get_interface_no_resume(serial->interface);
|
||||||
serial->interface->needs_remote_wakeup = 0;
|
serial->interface->needs_remote_wakeup = 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(usb_wwan_close);
|
EXPORT_SYMBOL(usb_wwan_close);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue