diff options
Diffstat (limited to 'drivers/usb/serial/mct_u232.c')
-rw-r--r-- | drivers/usb/serial/mct_u232.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 873795548fc0..d8825e159aa5 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -92,7 +92,7 @@ static int debug; | |||
92 | * Function prototypes | 92 | * Function prototypes |
93 | */ | 93 | */ |
94 | static int mct_u232_startup(struct usb_serial *serial); | 94 | static int mct_u232_startup(struct usb_serial *serial); |
95 | static void mct_u232_shutdown(struct usb_serial *serial); | 95 | static void mct_u232_release(struct usb_serial *serial); |
96 | static int mct_u232_open(struct tty_struct *tty, | 96 | static int mct_u232_open(struct tty_struct *tty, |
97 | struct usb_serial_port *port, struct file *filp); | 97 | struct usb_serial_port *port, struct file *filp); |
98 | static void mct_u232_close(struct usb_serial_port *port); | 98 | static void mct_u232_close(struct usb_serial_port *port); |
@@ -149,7 +149,7 @@ static struct usb_serial_driver mct_u232_device = { | |||
149 | .tiocmget = mct_u232_tiocmget, | 149 | .tiocmget = mct_u232_tiocmget, |
150 | .tiocmset = mct_u232_tiocmset, | 150 | .tiocmset = mct_u232_tiocmset, |
151 | .attach = mct_u232_startup, | 151 | .attach = mct_u232_startup, |
152 | .shutdown = mct_u232_shutdown, | 152 | .release = mct_u232_release, |
153 | }; | 153 | }; |
154 | 154 | ||
155 | 155 | ||
@@ -407,7 +407,7 @@ static int mct_u232_startup(struct usb_serial *serial) | |||
407 | } /* mct_u232_startup */ | 407 | } /* mct_u232_startup */ |
408 | 408 | ||
409 | 409 | ||
410 | static void mct_u232_shutdown(struct usb_serial *serial) | 410 | static void mct_u232_release(struct usb_serial *serial) |
411 | { | 411 | { |
412 | struct mct_u232_private *priv; | 412 | struct mct_u232_private *priv; |
413 | int i; | 413 | int i; |
@@ -417,12 +417,9 @@ static void mct_u232_shutdown(struct usb_serial *serial) | |||
417 | for (i = 0; i < serial->num_ports; ++i) { | 417 | for (i = 0; i < serial->num_ports; ++i) { |
418 | /* My special items, the standard routines free my urbs */ | 418 | /* My special items, the standard routines free my urbs */ |
419 | priv = usb_get_serial_port_data(serial->port[i]); | 419 | priv = usb_get_serial_port_data(serial->port[i]); |
420 | if (priv) { | 420 | kfree(priv); |
421 | usb_set_serial_port_data(serial->port[i], NULL); | ||
422 | kfree(priv); | ||
423 | } | ||
424 | } | 421 | } |
425 | } /* mct_u232_shutdown */ | 422 | } /* mct_u232_release */ |
426 | 423 | ||
427 | static int mct_u232_open(struct tty_struct *tty, | 424 | static int mct_u232_open(struct tty_struct *tty, |
428 | struct usb_serial_port *port, struct file *filp) | 425 | struct usb_serial_port *port, struct file *filp) |