USB: serial: fix port release
authorJohan Hovold <jhovold@gmail.com>
Thu, 21 Mar 2013 11:36:46 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 20:48:27 +0000 (13:48 -0700)
We should not call kill_traffic (and usb_kill_urb) once disconnect
returns. Any pending urbs are killed at disconnect and new submissions
are prevented by usb_unbind_interface (and usb_disable_interface).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/usb-serial.c

index 3eb4d06e49be1dc948852903604b97bbd108c9a5..456792952db6d3205c68a6562fa68be9a583d871 100644 (file)
@@ -572,13 +572,6 @@ static void port_release(struct device *dev)
 
        dev_dbg(dev, "%s\n", __func__);
 
-       /*
-        * Stop all the traffic before cancelling the work, so that
-        * nobody will restart it by calling usb_serial_port_softint.
-        */
-       kill_traffic(port);
-       cancel_work_sync(&port->work);
-
        usb_free_urb(port->interrupt_in_urb);
        usb_free_urb(port->interrupt_out_urb);
        for (i = 0; i < ARRAY_SIZE(port->read_urbs); ++i) {