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

USB: serial: fix generic disconnect implementation

There is no need for the generic disconnect callback to stop the read
and write urbs a second time as this has already been taken care of by
close (which is called from hangup as part of disconnect).
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 618e183d
...@@ -102,7 +102,7 @@ int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port ...@@ -102,7 +102,7 @@ int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port
} }
EXPORT_SYMBOL_GPL(usb_serial_generic_open); EXPORT_SYMBOL_GPL(usb_serial_generic_open);
static void generic_cleanup(struct usb_serial_port *port) void usb_serial_generic_close(struct usb_serial_port *port)
{ {
unsigned long flags; unsigned long flags;
int i; int i;
...@@ -120,11 +120,6 @@ static void generic_cleanup(struct usb_serial_port *port) ...@@ -120,11 +120,6 @@ static void generic_cleanup(struct usb_serial_port *port)
usb_kill_urb(port->read_urbs[i]); usb_kill_urb(port->read_urbs[i]);
} }
} }
void usb_serial_generic_close(struct usb_serial_port *port)
{
generic_cleanup(port);
}
EXPORT_SYMBOL_GPL(usb_serial_generic_close); EXPORT_SYMBOL_GPL(usb_serial_generic_close);
int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,
...@@ -507,11 +502,6 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_resume); ...@@ -507,11 +502,6 @@ EXPORT_SYMBOL_GPL(usb_serial_generic_resume);
void usb_serial_generic_disconnect(struct usb_serial *serial) void usb_serial_generic_disconnect(struct usb_serial *serial)
{ {
int i;
/* stop reads and writes on all ports */
for (i = 0; i < serial->num_ports; ++i)
generic_cleanup(serial->port[i]);
} }
EXPORT_SYMBOL_GPL(usb_serial_generic_disconnect); EXPORT_SYMBOL_GPL(usb_serial_generic_disconnect);
......
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