diff options
Diffstat (limited to 'drivers/usb/serial/garmin_gps.c')
-rw-r--r-- | drivers/usb/serial/garmin_gps.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 5092d6aba659..8839f1c70b7f 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -1475,7 +1475,7 @@ static int garmin_attach(struct usb_serial *serial) | |||
1475 | } | 1475 | } |
1476 | 1476 | ||
1477 | 1477 | ||
1478 | static void garmin_shutdown(struct usb_serial *serial) | 1478 | static void garmin_disconnect(struct usb_serial *serial) |
1479 | { | 1479 | { |
1480 | struct usb_serial_port *port = serial->port[0]; | 1480 | struct usb_serial_port *port = serial->port[0]; |
1481 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | 1481 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); |
@@ -1484,8 +1484,17 @@ static void garmin_shutdown(struct usb_serial *serial) | |||
1484 | 1484 | ||
1485 | usb_kill_urb(port->interrupt_in_urb); | 1485 | usb_kill_urb(port->interrupt_in_urb); |
1486 | del_timer_sync(&garmin_data_p->timer); | 1486 | del_timer_sync(&garmin_data_p->timer); |
1487 | } | ||
1488 | |||
1489 | |||
1490 | static void garmin_release(struct usb_serial *serial) | ||
1491 | { | ||
1492 | struct usb_serial_port *port = serial->port[0]; | ||
1493 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | ||
1494 | |||
1495 | dbg("%s", __func__); | ||
1496 | |||
1487 | kfree(garmin_data_p); | 1497 | kfree(garmin_data_p); |
1488 | usb_set_serial_port_data(port, NULL); | ||
1489 | } | 1498 | } |
1490 | 1499 | ||
1491 | 1500 | ||
@@ -1504,7 +1513,8 @@ static struct usb_serial_driver garmin_device = { | |||
1504 | .throttle = garmin_throttle, | 1513 | .throttle = garmin_throttle, |
1505 | .unthrottle = garmin_unthrottle, | 1514 | .unthrottle = garmin_unthrottle, |
1506 | .attach = garmin_attach, | 1515 | .attach = garmin_attach, |
1507 | .shutdown = garmin_shutdown, | 1516 | .disconnect = garmin_disconnect, |
1517 | .release = garmin_release, | ||
1508 | .write = garmin_write, | 1518 | .write = garmin_write, |
1509 | .write_room = garmin_write_room, | 1519 | .write_room = garmin_write_room, |
1510 | .write_bulk_callback = garmin_write_bulk_callback, | 1520 | .write_bulk_callback = garmin_write_bulk_callback, |