diff options
Diffstat (limited to 'drivers/usb/serial/ti_usb_3410_5052.c')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 42cb04c403b..991d8232e37 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c | |||
@@ -97,7 +97,7 @@ struct ti_device { | |||
97 | /* Function Declarations */ | 97 | /* Function Declarations */ |
98 | 98 | ||
99 | static int ti_startup(struct usb_serial *serial); | 99 | static int ti_startup(struct usb_serial *serial); |
100 | static void ti_shutdown(struct usb_serial *serial); | 100 | static void ti_release(struct usb_serial *serial); |
101 | static int ti_open(struct tty_struct *tty, struct usb_serial_port *port, | 101 | static int ti_open(struct tty_struct *tty, struct usb_serial_port *port, |
102 | struct file *file); | 102 | struct file *file); |
103 | static void ti_close(struct usb_serial_port *port); | 103 | static void ti_close(struct usb_serial_port *port); |
@@ -230,7 +230,7 @@ static struct usb_serial_driver ti_1port_device = { | |||
230 | .id_table = ti_id_table_3410, | 230 | .id_table = ti_id_table_3410, |
231 | .num_ports = 1, | 231 | .num_ports = 1, |
232 | .attach = ti_startup, | 232 | .attach = ti_startup, |
233 | .shutdown = ti_shutdown, | 233 | .release = ti_release, |
234 | .open = ti_open, | 234 | .open = ti_open, |
235 | .close = ti_close, | 235 | .close = ti_close, |
236 | .write = ti_write, | 236 | .write = ti_write, |
@@ -258,7 +258,7 @@ static struct usb_serial_driver ti_2port_device = { | |||
258 | .id_table = ti_id_table_5052, | 258 | .id_table = ti_id_table_5052, |
259 | .num_ports = 2, | 259 | .num_ports = 2, |
260 | .attach = ti_startup, | 260 | .attach = ti_startup, |
261 | .shutdown = ti_shutdown, | 261 | .release = ti_release, |
262 | .open = ti_open, | 262 | .open = ti_open, |
263 | .close = ti_close, | 263 | .close = ti_close, |
264 | .write = ti_write, | 264 | .write = ti_write, |
@@ -473,7 +473,7 @@ free_tdev: | |||
473 | } | 473 | } |
474 | 474 | ||
475 | 475 | ||
476 | static void ti_shutdown(struct usb_serial *serial) | 476 | static void ti_release(struct usb_serial *serial) |
477 | { | 477 | { |
478 | int i; | 478 | int i; |
479 | struct ti_device *tdev = usb_get_serial_data(serial); | 479 | struct ti_device *tdev = usb_get_serial_data(serial); |
@@ -486,12 +486,10 @@ static void ti_shutdown(struct usb_serial *serial) | |||
486 | if (tport) { | 486 | if (tport) { |
487 | ti_buf_free(tport->tp_write_buf); | 487 | ti_buf_free(tport->tp_write_buf); |
488 | kfree(tport); | 488 | kfree(tport); |
489 | usb_set_serial_port_data(serial->port[i], NULL); | ||
490 | } | 489 | } |
491 | } | 490 | } |
492 | 491 | ||
493 | kfree(tdev); | 492 | kfree(tdev); |
494 | usb_set_serial_data(serial, NULL); | ||
495 | } | 493 | } |
496 | 494 | ||
497 | 495 | ||