aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/option.c')
-rw-r--r--drivers/usb/serial/option.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a38971cc373..575816e6ba3 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -51,7 +51,8 @@ static void option_close(struct usb_serial_port *port);
51static void option_dtr_rts(struct usb_serial_port *port, int on); 51static void option_dtr_rts(struct usb_serial_port *port, int on);
52 52
53static int option_startup(struct usb_serial *serial); 53static int option_startup(struct usb_serial *serial);
54static void option_shutdown(struct usb_serial *serial); 54static void option_disconnect(struct usb_serial *serial);
55static void option_release(struct usb_serial *serial);
55static int option_write_room(struct tty_struct *tty); 56static int option_write_room(struct tty_struct *tty);
56 57
57static void option_instat_callback(struct urb *urb); 58static void option_instat_callback(struct urb *urb);
@@ -568,7 +569,8 @@ static struct usb_serial_driver option_1port_device = {
568 .tiocmget = option_tiocmget, 569 .tiocmget = option_tiocmget,
569 .tiocmset = option_tiocmset, 570 .tiocmset = option_tiocmset,
570 .attach = option_startup, 571 .attach = option_startup,
571 .shutdown = option_shutdown, 572 .disconnect = option_disconnect,
573 .release = option_release,
572 .read_int_callback = option_instat_callback, 574 .read_int_callback = option_instat_callback,
573 .suspend = option_suspend, 575 .suspend = option_suspend,
574 .resume = option_resume, 576 .resume = option_resume,
@@ -1149,7 +1151,14 @@ static void stop_read_write_urbs(struct usb_serial *serial)
1149 } 1151 }
1150} 1152}
1151 1153
1152static void option_shutdown(struct usb_serial *serial) 1154static void option_disconnect(struct usb_serial *serial)
1155{
1156 dbg("%s", __func__);
1157
1158 stop_read_write_urbs(serial);
1159}
1160
1161static void option_release(struct usb_serial *serial)
1153{ 1162{
1154 int i, j; 1163 int i, j;
1155 struct usb_serial_port *port; 1164 struct usb_serial_port *port;
@@ -1157,8 +1166,6 @@ static void option_shutdown(struct usb_serial *serial)
1157 1166
1158 dbg("%s", __func__); 1167 dbg("%s", __func__);
1159 1168
1160 stop_read_write_urbs(serial);
1161
1162 /* Now free them */ 1169 /* Now free them */
1163 for (i = 0; i < serial->num_ports; ++i) { 1170 for (i = 0; i < serial->num_ports; ++i) {
1164 port = serial->port[i]; 1171 port = serial->port[i];