diff options
Diffstat (limited to 'drivers/usb/serial/mos7720.c')
-rw-r--r-- | drivers/usb/serial/mos7720.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 9e1a013ee7f6..bfc5ce000ef9 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -1521,19 +1521,16 @@ static int mos7720_startup(struct usb_serial *serial) | |||
1521 | return 0; | 1521 | return 0; |
1522 | } | 1522 | } |
1523 | 1523 | ||
1524 | static void mos7720_shutdown(struct usb_serial *serial) | 1524 | static void mos7720_release(struct usb_serial *serial) |
1525 | { | 1525 | { |
1526 | int i; | 1526 | int i; |
1527 | 1527 | ||
1528 | /* free private structure allocated for serial port */ | 1528 | /* free private structure allocated for serial port */ |
1529 | for (i = 0; i < serial->num_ports; ++i) { | 1529 | for (i = 0; i < serial->num_ports; ++i) |
1530 | kfree(usb_get_serial_port_data(serial->port[i])); | 1530 | kfree(usb_get_serial_port_data(serial->port[i])); |
1531 | usb_set_serial_port_data(serial->port[i], NULL); | ||
1532 | } | ||
1533 | 1531 | ||
1534 | /* free private structure allocated for serial device */ | 1532 | /* free private structure allocated for serial device */ |
1535 | kfree(usb_get_serial_data(serial)); | 1533 | kfree(usb_get_serial_data(serial)); |
1536 | usb_set_serial_data(serial, NULL); | ||
1537 | } | 1534 | } |
1538 | 1535 | ||
1539 | static struct usb_driver usb_driver = { | 1536 | static struct usb_driver usb_driver = { |
@@ -1558,7 +1555,7 @@ static struct usb_serial_driver moschip7720_2port_driver = { | |||
1558 | .throttle = mos7720_throttle, | 1555 | .throttle = mos7720_throttle, |
1559 | .unthrottle = mos7720_unthrottle, | 1556 | .unthrottle = mos7720_unthrottle, |
1560 | .attach = mos7720_startup, | 1557 | .attach = mos7720_startup, |
1561 | .shutdown = mos7720_shutdown, | 1558 | .release = mos7720_release, |
1562 | .ioctl = mos7720_ioctl, | 1559 | .ioctl = mos7720_ioctl, |
1563 | .set_termios = mos7720_set_termios, | 1560 | .set_termios = mos7720_set_termios, |
1564 | .write = mos7720_write, | 1561 | .write = mos7720_write, |