diff options
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r-- | drivers/usb/serial/opticon.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index b500ad10b758..336bba79ad32 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c | |||
@@ -173,8 +173,7 @@ static int opticon_open(struct tty_struct *tty, struct usb_serial_port *port, | |||
173 | return result; | 173 | return result; |
174 | } | 174 | } |
175 | 175 | ||
176 | static void opticon_close(struct tty_struct *tty, struct usb_serial_port *port, | 176 | static void opticon_close(struct usb_serial_port *port) |
177 | struct file *filp) | ||
178 | { | 177 | { |
179 | struct opticon_private *priv = usb_get_serial_data(port->serial); | 178 | struct opticon_private *priv = usb_get_serial_data(port->serial); |
180 | 179 | ||
@@ -464,7 +463,7 @@ error: | |||
464 | return retval; | 463 | return retval; |
465 | } | 464 | } |
466 | 465 | ||
467 | static void opticon_shutdown(struct usb_serial *serial) | 466 | static void opticon_disconnect(struct usb_serial *serial) |
468 | { | 467 | { |
469 | struct opticon_private *priv = usb_get_serial_data(serial); | 468 | struct opticon_private *priv = usb_get_serial_data(serial); |
470 | 469 | ||
@@ -472,9 +471,16 @@ static void opticon_shutdown(struct usb_serial *serial) | |||
472 | 471 | ||
473 | usb_kill_urb(priv->bulk_read_urb); | 472 | usb_kill_urb(priv->bulk_read_urb); |
474 | usb_free_urb(priv->bulk_read_urb); | 473 | usb_free_urb(priv->bulk_read_urb); |
474 | } | ||
475 | |||
476 | static void opticon_release(struct usb_serial *serial) | ||
477 | { | ||
478 | struct opticon_private *priv = usb_get_serial_data(serial); | ||
479 | |||
480 | dbg("%s", __func__); | ||
481 | |||
475 | kfree(priv->bulk_in_buffer); | 482 | kfree(priv->bulk_in_buffer); |
476 | kfree(priv); | 483 | kfree(priv); |
477 | usb_set_serial_data(serial, NULL); | ||
478 | } | 484 | } |
479 | 485 | ||
480 | static int opticon_suspend(struct usb_interface *intf, pm_message_t message) | 486 | static int opticon_suspend(struct usb_interface *intf, pm_message_t message) |
@@ -525,7 +531,8 @@ static struct usb_serial_driver opticon_device = { | |||
525 | .close = opticon_close, | 531 | .close = opticon_close, |
526 | .write = opticon_write, | 532 | .write = opticon_write, |
527 | .write_room = opticon_write_room, | 533 | .write_room = opticon_write_room, |
528 | .shutdown = opticon_shutdown, | 534 | .disconnect = opticon_disconnect, |
535 | .release = opticon_release, | ||
529 | .throttle = opticon_throttle, | 536 | .throttle = opticon_throttle, |
530 | .unthrottle = opticon_unthrottle, | 537 | .unthrottle = opticon_unthrottle, |
531 | .ioctl = opticon_ioctl, | 538 | .ioctl = opticon_ioctl, |