diff options
Diffstat (limited to 'drivers/usb/serial/garmin_gps.c')
-rw-r--r-- | drivers/usb/serial/garmin_gps.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index e8eb6347bf3a..346c15a51066 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c | |||
@@ -216,16 +216,8 @@ static const struct usb_device_id id_table[] = { | |||
216 | { USB_DEVICE(GARMIN_VENDOR_ID, 3) }, | 216 | { USB_DEVICE(GARMIN_VENDOR_ID, 3) }, |
217 | { } /* Terminating entry */ | 217 | { } /* Terminating entry */ |
218 | }; | 218 | }; |
219 | |||
220 | MODULE_DEVICE_TABLE(usb, id_table); | 219 | MODULE_DEVICE_TABLE(usb, id_table); |
221 | 220 | ||
222 | static struct usb_driver garmin_driver = { | ||
223 | .name = "garmin_gps", | ||
224 | .probe = usb_serial_probe, | ||
225 | .disconnect = usb_serial_disconnect, | ||
226 | .id_table = id_table, | ||
227 | }; | ||
228 | |||
229 | 221 | ||
230 | static inline int getLayerId(const __u8 *usbPacket) | 222 | static inline int getLayerId(const __u8 *usbPacket) |
231 | { | 223 | { |
@@ -345,8 +337,6 @@ static void pkt_clear(struct garmin_data *garmin_data_p) | |||
345 | unsigned long flags; | 337 | unsigned long flags; |
346 | struct garmin_packet *result = NULL; | 338 | struct garmin_packet *result = NULL; |
347 | 339 | ||
348 | dbg("%s", __func__); | ||
349 | |||
350 | spin_lock_irqsave(&garmin_data_p->lock, flags); | 340 | spin_lock_irqsave(&garmin_data_p->lock, flags); |
351 | while (!list_empty(&garmin_data_p->pktlist)) { | 341 | while (!list_empty(&garmin_data_p->pktlist)) { |
352 | result = (struct garmin_packet *)garmin_data_p->pktlist.next; | 342 | result = (struct garmin_packet *)garmin_data_p->pktlist.next; |
@@ -939,8 +929,6 @@ static int garmin_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
939 | int status = 0; | 929 | int status = 0; |
940 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | 930 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); |
941 | 931 | ||
942 | dbg("%s - port %d", __func__, port->number); | ||
943 | |||
944 | spin_lock_irqsave(&garmin_data_p->lock, flags); | 932 | spin_lock_irqsave(&garmin_data_p->lock, flags); |
945 | garmin_data_p->mode = initial_mode; | 933 | garmin_data_p->mode = initial_mode; |
946 | garmin_data_p->count = 0; | 934 | garmin_data_p->count = 0; |
@@ -996,8 +984,6 @@ static void garmin_write_bulk_callback(struct urb *urb) | |||
996 | struct garmin_data *garmin_data_p = | 984 | struct garmin_data *garmin_data_p = |
997 | usb_get_serial_port_data(port); | 985 | usb_get_serial_port_data(port); |
998 | 986 | ||
999 | dbg("%s - port %d", __func__, port->number); | ||
1000 | |||
1001 | if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)) { | 987 | if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)) { |
1002 | 988 | ||
1003 | if (garmin_data_p->mode == MODE_GARMIN_SERIAL) { | 989 | if (garmin_data_p->mode == MODE_GARMIN_SERIAL) { |
@@ -1027,9 +1013,6 @@ static int garmin_write_bulk(struct usb_serial_port *port, | |||
1027 | unsigned char *buffer; | 1013 | unsigned char *buffer; |
1028 | int status; | 1014 | int status; |
1029 | 1015 | ||
1030 | dbg("%s - port %d, state %d", __func__, port->number, | ||
1031 | garmin_data_p->state); | ||
1032 | |||
1033 | spin_lock_irqsave(&garmin_data_p->lock, flags); | 1016 | spin_lock_irqsave(&garmin_data_p->lock, flags); |
1034 | garmin_data_p->flags &= ~FLAGS_DROP_DATA; | 1017 | garmin_data_p->flags &= ~FLAGS_DROP_DATA; |
1035 | spin_unlock_irqrestore(&garmin_data_p->lock, flags); | 1018 | spin_unlock_irqrestore(&garmin_data_p->lock, flags); |
@@ -1224,8 +1207,6 @@ static void garmin_read_bulk_callback(struct urb *urb) | |||
1224 | int status = urb->status; | 1207 | int status = urb->status; |
1225 | int retval; | 1208 | int retval; |
1226 | 1209 | ||
1227 | dbg("%s - port %d", __func__, port->number); | ||
1228 | |||
1229 | if (!serial) { | 1210 | if (!serial) { |
1230 | dbg("%s - bad serial pointer, exiting", __func__); | 1211 | dbg("%s - bad serial pointer, exiting", __func__); |
1231 | return; | 1212 | return; |
@@ -1384,7 +1365,6 @@ static void garmin_throttle(struct tty_struct *tty) | |||
1384 | struct usb_serial_port *port = tty->driver_data; | 1365 | struct usb_serial_port *port = tty->driver_data; |
1385 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | 1366 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); |
1386 | 1367 | ||
1387 | dbg("%s - port %d", __func__, port->number); | ||
1388 | /* set flag, data received will be put into a queue | 1368 | /* set flag, data received will be put into a queue |
1389 | for later processing */ | 1369 | for later processing */ |
1390 | spin_lock_irq(&garmin_data_p->lock); | 1370 | spin_lock_irq(&garmin_data_p->lock); |
@@ -1399,7 +1379,6 @@ static void garmin_unthrottle(struct tty_struct *tty) | |||
1399 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | 1379 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); |
1400 | int status; | 1380 | int status; |
1401 | 1381 | ||
1402 | dbg("%s - port %d", __func__, port->number); | ||
1403 | spin_lock_irq(&garmin_data_p->lock); | 1382 | spin_lock_irq(&garmin_data_p->lock); |
1404 | garmin_data_p->flags &= ~FLAGS_THROTTLED; | 1383 | garmin_data_p->flags &= ~FLAGS_THROTTLED; |
1405 | spin_unlock_irq(&garmin_data_p->lock); | 1384 | spin_unlock_irq(&garmin_data_p->lock); |
@@ -1441,8 +1420,6 @@ static int garmin_attach(struct usb_serial *serial) | |||
1441 | struct usb_serial_port *port = serial->port[0]; | 1420 | struct usb_serial_port *port = serial->port[0]; |
1442 | struct garmin_data *garmin_data_p = NULL; | 1421 | struct garmin_data *garmin_data_p = NULL; |
1443 | 1422 | ||
1444 | dbg("%s", __func__); | ||
1445 | |||
1446 | garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL); | 1423 | garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL); |
1447 | if (garmin_data_p == NULL) { | 1424 | if (garmin_data_p == NULL) { |
1448 | dev_err(&port->dev, "%s - Out of memory\n", __func__); | 1425 | dev_err(&port->dev, "%s - Out of memory\n", __func__); |
@@ -1471,8 +1448,6 @@ static void garmin_disconnect(struct usb_serial *serial) | |||
1471 | struct usb_serial_port *port = serial->port[0]; | 1448 | struct usb_serial_port *port = serial->port[0]; |
1472 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | 1449 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); |
1473 | 1450 | ||
1474 | dbg("%s", __func__); | ||
1475 | |||
1476 | usb_kill_urb(port->interrupt_in_urb); | 1451 | usb_kill_urb(port->interrupt_in_urb); |
1477 | del_timer_sync(&garmin_data_p->timer); | 1452 | del_timer_sync(&garmin_data_p->timer); |
1478 | } | 1453 | } |
@@ -1483,8 +1458,6 @@ static void garmin_release(struct usb_serial *serial) | |||
1483 | struct usb_serial_port *port = serial->port[0]; | 1458 | struct usb_serial_port *port = serial->port[0]; |
1484 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); | 1459 | struct garmin_data *garmin_data_p = usb_get_serial_port_data(port); |
1485 | 1460 | ||
1486 | dbg("%s", __func__); | ||
1487 | |||
1488 | kfree(garmin_data_p); | 1461 | kfree(garmin_data_p); |
1489 | } | 1462 | } |
1490 | 1463 | ||
@@ -1516,7 +1489,7 @@ static struct usb_serial_driver * const serial_drivers[] = { | |||
1516 | &garmin_device, NULL | 1489 | &garmin_device, NULL |
1517 | }; | 1490 | }; |
1518 | 1491 | ||
1519 | module_usb_serial_driver(garmin_driver, serial_drivers); | 1492 | module_usb_serial_driver(serial_drivers, id_table); |
1520 | 1493 | ||
1521 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1494 | MODULE_AUTHOR(DRIVER_AUTHOR); |
1522 | MODULE_DESCRIPTION(DRIVER_DESC); | 1495 | MODULE_DESCRIPTION(DRIVER_DESC); |