aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/symbolserial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/symbolserial.c')
-rw-r--r--drivers/usb/serial/symbolserial.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
index 69879e437940..6157fac9366b 100644
--- a/drivers/usb/serial/symbolserial.c
+++ b/drivers/usb/serial/symbolserial.c
@@ -152,8 +152,7 @@ static int symbol_open(struct tty_struct *tty, struct usb_serial_port *port,
152 return result; 152 return result;
153} 153}
154 154
155static void symbol_close(struct tty_struct *tty, struct usb_serial_port *port, 155static void symbol_close(struct usb_serial_port *port)
156 struct file *filp)
157{ 156{
158 struct symbol_private *priv = usb_get_serial_data(port->serial); 157 struct symbol_private *priv = usb_get_serial_data(port->serial);
159 158
@@ -268,7 +267,7 @@ error:
268 return retval; 267 return retval;
269} 268}
270 269
271static void symbol_shutdown(struct usb_serial *serial) 270static void symbol_disconnect(struct usb_serial *serial)
272{ 271{
273 struct symbol_private *priv = usb_get_serial_data(serial); 272 struct symbol_private *priv = usb_get_serial_data(serial);
274 273
@@ -276,9 +275,16 @@ static void symbol_shutdown(struct usb_serial *serial)
276 275
277 usb_kill_urb(priv->int_urb); 276 usb_kill_urb(priv->int_urb);
278 usb_free_urb(priv->int_urb); 277 usb_free_urb(priv->int_urb);
278}
279
280static void symbol_release(struct usb_serial *serial)
281{
282 struct symbol_private *priv = usb_get_serial_data(serial);
283
284 dbg("%s", __func__);
285
279 kfree(priv->int_buffer); 286 kfree(priv->int_buffer);
280 kfree(priv); 287 kfree(priv);
281 usb_set_serial_data(serial, NULL);
282} 288}
283 289
284static struct usb_driver symbol_driver = { 290static struct usb_driver symbol_driver = {
@@ -300,7 +306,8 @@ static struct usb_serial_driver symbol_device = {
300 .attach = symbol_startup, 306 .attach = symbol_startup,
301 .open = symbol_open, 307 .open = symbol_open,
302 .close = symbol_close, 308 .close = symbol_close,
303 .shutdown = symbol_shutdown, 309 .disconnect = symbol_disconnect,
310 .release = symbol_release,
304 .throttle = symbol_throttle, 311 .throttle = symbol_throttle,
305 .unthrottle = symbol_unthrottle, 312 .unthrottle = symbol_unthrottle,
306}; 313};