aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/garmin_gps.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-03 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commit441b62c1edb986827154768d89bbac0ba779984f (patch)
tree13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/garmin_gps.c
parent14722ef4acedc643f0b78b7165ceff2d300dae4d (diff)
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/garmin_gps.c')
-rw-r--r--drivers/usb/serial/garmin_gps.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 87b77f92ae07..513d771adc4e 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -280,7 +280,7 @@ static void send_to_tty(struct usb_serial_port *port,
280 if (tty && actual_length) { 280 if (tty && actual_length) {
281 281
282 usb_serial_debug_data(debug, &port->dev, 282 usb_serial_debug_data(debug, &port->dev,
283 __FUNCTION__, actual_length, data); 283 __func__, actual_length, data);
284 284
285 tty_buffer_request_room(tty, actual_length); 285 tty_buffer_request_room(tty, actual_length);
286 tty_insert_flip_string(tty, data, actual_length); 286 tty_insert_flip_string(tty, data, actual_length);
@@ -355,7 +355,7 @@ static void pkt_clear(struct garmin_data * garmin_data_p)
355 unsigned long flags; 355 unsigned long flags;
356 struct garmin_packet *result = NULL; 356 struct garmin_packet *result = NULL;
357 357
358 dbg("%s", __FUNCTION__); 358 dbg("%s", __func__);
359 359
360 spin_lock_irqsave(&garmin_data_p->lock, flags); 360 spin_lock_irqsave(&garmin_data_p->lock, flags);
361 while (!list_empty(&garmin_data_p->pktlist)) { 361 while (!list_empty(&garmin_data_p->pktlist)) {
@@ -379,7 +379,7 @@ static int gsp_send_ack(struct garmin_data * garmin_data_p, __u8 pkt_id)
379 __u8 *ptr = pkt; 379 __u8 *ptr = pkt;
380 unsigned l = 0; 380 unsigned l = 0;
381 381
382 dbg("%s - pkt-id: 0x%X.", __FUNCTION__, 0xFF & pkt_id); 382 dbg("%s - pkt-id: 0x%X.", __func__, 0xFF & pkt_id);
383 383
384 *ptr++ = DLE; 384 *ptr++ = DLE;
385 *ptr++ = ACK; 385 *ptr++ = ACK;
@@ -429,11 +429,11 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
429 int size = recpkt[1]; 429 int size = recpkt[1];
430 430
431 usb_serial_debug_data(debug, &garmin_data_p->port->dev, 431 usb_serial_debug_data(debug, &garmin_data_p->port->dev,
432 __FUNCTION__, count-GSP_INITIAL_OFFSET, recpkt); 432 __func__, count-GSP_INITIAL_OFFSET, recpkt);
433 433
434 if (size != (count-GSP_INITIAL_OFFSET-3)) { 434 if (size != (count-GSP_INITIAL_OFFSET-3)) {
435 dbg("%s - invalid size, expected %d bytes, got %d", 435 dbg("%s - invalid size, expected %d bytes, got %d",
436 __FUNCTION__, size, (count-GSP_INITIAL_OFFSET-3)); 436 __func__, size, (count-GSP_INITIAL_OFFSET-3));
437 return -EINVPKT; 437 return -EINVPKT;
438 } 438 }
439 439
@@ -443,7 +443,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
443 // sanity check, remove after test ... 443 // sanity check, remove after test ...
444 if ((__u8*)&(usbdata[3]) != recpkt) { 444 if ((__u8*)&(usbdata[3]) != recpkt) {
445 dbg("%s - ptr mismatch %p - %p", 445 dbg("%s - ptr mismatch %p - %p",
446 __FUNCTION__, &(usbdata[4]), recpkt); 446 __func__, &(usbdata[4]), recpkt);
447 return -EINVPKT; 447 return -EINVPKT;
448 } 448 }
449 449
@@ -454,7 +454,7 @@ static int gsp_rec_packet(struct garmin_data * garmin_data_p, int count)
454 454
455 if ((0xff & (cksum + *recpkt)) != 0) { 455 if ((0xff & (cksum + *recpkt)) != 0) {
456 dbg("%s - invalid checksum, expected %02x, got %02x", 456 dbg("%s - invalid checksum, expected %02x, got %02x",
457 __FUNCTION__, 0xff & -cksum, 0xff & *recpkt); 457 __func__, 0xff & -cksum, 0xff & *recpkt);
458 return -EINVPKT; 458 return -EINVPKT;
459 } 459 }
460 460
@@ -519,7 +519,7 @@ static int gsp_receive(struct garmin_data * garmin_data_p,
519 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 519 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
520 520
521 dbg("%s - dle=%d skip=%d size=%d count=%d", 521 dbg("%s - dle=%d skip=%d size=%d count=%d",
522 __FUNCTION__, dleSeen, skip, size, count); 522 __func__, dleSeen, skip, size, count);
523 523
524 if (size == 0) { 524 if (size == 0) {
525 size = GSP_INITIAL_OFFSET; 525 size = GSP_INITIAL_OFFSET;
@@ -578,7 +578,7 @@ static int gsp_receive(struct garmin_data * garmin_data_p,
578 } 578 }
579 579
580 if (size >= GPS_IN_BUFSIZ) { 580 if (size >= GPS_IN_BUFSIZ) {
581 dbg("%s - packet too large.", __FUNCTION__); 581 dbg("%s - packet too large.", __func__);
582 skip = 1; 582 skip = 1;
583 size = GSP_INITIAL_OFFSET; 583 size = GSP_INITIAL_OFFSET;
584 dleSeen = 0; 584 dleSeen = 0;
@@ -634,7 +634,7 @@ static int gsp_send(struct garmin_data * garmin_data_p,
634 int i=0; 634 int i=0;
635 int k; 635 int k;
636 636
637 dbg("%s - state %d - %d bytes.", __FUNCTION__, 637 dbg("%s - state %d - %d bytes.", __func__,
638 garmin_data_p->state, count); 638 garmin_data_p->state, count);
639 639
640 k = garmin_data_p->outsize; 640 k = garmin_data_p->outsize;
@@ -658,13 +658,13 @@ static int gsp_send(struct garmin_data * garmin_data_p,
658 return 0; 658 return 0;
659 } 659 }
660 660
661 dbg("%s - %d bytes in buffer, %d bytes in pkt.", __FUNCTION__, 661 dbg("%s - %d bytes in buffer, %d bytes in pkt.", __func__,
662 k, i); 662 k, i);
663 663
664 /* garmin_data_p->outbuffer now contains a complete packet */ 664 /* garmin_data_p->outbuffer now contains a complete packet */
665 665
666 usb_serial_debug_data(debug, &garmin_data_p->port->dev, 666 usb_serial_debug_data(debug, &garmin_data_p->port->dev,
667 __FUNCTION__, k, garmin_data_p->outbuffer); 667 __func__, k, garmin_data_p->outbuffer);
668 668
669 garmin_data_p->outsize = 0; 669 garmin_data_p->outsize = 0;
670 670
@@ -749,7 +749,7 @@ static void gsp_next_packet(struct garmin_data * garmin_data_p)
749 struct garmin_packet *pkt = NULL; 749 struct garmin_packet *pkt = NULL;
750 750
751 while ((pkt = pkt_pop(garmin_data_p)) != NULL) { 751 while ((pkt = pkt_pop(garmin_data_p)) != NULL) {
752 dbg("%s - next pkt: %d", __FUNCTION__, pkt->seq); 752 dbg("%s - next pkt: %d", __func__, pkt->seq);
753 if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) { 753 if (gsp_send(garmin_data_p, pkt->data, pkt->size) > 0) {
754 kfree(pkt); 754 kfree(pkt);
755 return; 755 return;
@@ -794,7 +794,7 @@ static int nat_receive(struct garmin_data * garmin_data_p,
794 if (len >= GPS_IN_BUFSIZ) { 794 if (len >= GPS_IN_BUFSIZ) {
795 /* seem to be an invalid packet, ignore rest of input */ 795 /* seem to be an invalid packet, ignore rest of input */
796 dbg("%s - packet size too large: %d", 796 dbg("%s - packet size too large: %d",
797 __FUNCTION__, len); 797 __func__, len);
798 garmin_data_p->insize = 0; 798 garmin_data_p->insize = 0;
799 count = 0; 799 count = 0;
800 result = -EINVPKT; 800 result = -EINVPKT;
@@ -873,11 +873,11 @@ static int process_resetdev_request(struct usb_serial_port *port)
873 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 873 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
874 874
875 usb_kill_urb (port->interrupt_in_urb); 875 usb_kill_urb (port->interrupt_in_urb);
876 dbg("%s - usb_reset_device", __FUNCTION__ ); 876 dbg("%s - usb_reset_device", __func__ );
877 status = usb_reset_device(port->serial->dev); 877 status = usb_reset_device(port->serial->dev);
878 if (status) 878 if (status)
879 dbg("%s - usb_reset_device failed: %d", 879 dbg("%s - usb_reset_device failed: %d",
880 __FUNCTION__, status); 880 __func__, status);
881 return status; 881 return status;
882} 882}
883 883
@@ -926,18 +926,18 @@ static int garmin_init_session(struct usb_serial_port *port)
926 if (status == 0) { 926 if (status == 0) {
927 usb_kill_urb (port->interrupt_in_urb); 927 usb_kill_urb (port->interrupt_in_urb);
928 928
929 dbg("%s - adding interrupt input", __FUNCTION__); 929 dbg("%s - adding interrupt input", __func__);
930 port->interrupt_in_urb->dev = serial->dev; 930 port->interrupt_in_urb->dev = serial->dev;
931 status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 931 status = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
932 if (status) 932 if (status)
933 dev_err(&serial->dev->dev, 933 dev_err(&serial->dev->dev,
934 "%s - failed submitting interrupt urb," 934 "%s - failed submitting interrupt urb,"
935 " error %d\n", 935 " error %d\n",
936 __FUNCTION__, status); 936 __func__, status);
937 } 937 }
938 938
939 if (status == 0) { 939 if (status == 0) {
940 dbg("%s - starting session ...", __FUNCTION__); 940 dbg("%s - starting session ...", __func__);
941 garmin_data_p->state = STATE_ACTIVE; 941 garmin_data_p->state = STATE_ACTIVE;
942 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ, 942 status = garmin_write_bulk(port, GARMIN_START_SESSION_REQ,
943 sizeof(GARMIN_START_SESSION_REQ), 943 sizeof(GARMIN_START_SESSION_REQ),
@@ -976,7 +976,7 @@ static int garmin_open (struct usb_serial_port *port, struct file *filp)
976 int status = 0; 976 int status = 0;
977 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 977 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
978 978
979 dbg("%s - port %d", __FUNCTION__, port->number); 979 dbg("%s - port %d", __func__, port->number);
980 980
981 /* 981 /*
982 * Force low_latency on so that our tty_push actually forces the data 982 * Force low_latency on so that our tty_push actually forces the data
@@ -1013,7 +1013,7 @@ static void garmin_close (struct usb_serial_port *port, struct file * filp)
1013 struct usb_serial *serial = port->serial; 1013 struct usb_serial *serial = port->serial;
1014 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1014 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1015 1015
1016 dbg("%s - port %d - mode=%d state=%d flags=0x%X", __FUNCTION__, 1016 dbg("%s - port %d - mode=%d state=%d flags=0x%X", __func__,
1017 port->number, garmin_data_p->mode, 1017 port->number, garmin_data_p->mode,
1018 garmin_data_p->state, garmin_data_p->flags); 1018 garmin_data_p->state, garmin_data_p->flags);
1019 1019
@@ -1052,7 +1052,7 @@ static void garmin_write_bulk_callback (struct urb *urb)
1052 if (port) { 1052 if (port) {
1053 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1053 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1054 1054
1055 dbg("%s - port %d", __FUNCTION__, port->number); 1055 dbg("%s - port %d", __func__, port->number);
1056 1056
1057 if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer) 1057 if (GARMIN_LAYERID_APPL == getLayerId(urb->transfer_buffer)
1058 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) { 1058 && (garmin_data_p->mode == MODE_GARMIN_SERIAL)) {
@@ -1061,7 +1061,7 @@ static void garmin_write_bulk_callback (struct urb *urb)
1061 1061
1062 if (status) { 1062 if (status) {
1063 dbg("%s - nonzero write bulk status received: %d", 1063 dbg("%s - nonzero write bulk status received: %d",
1064 __FUNCTION__, urb->status); 1064 __func__, urb->status);
1065 spin_lock_irqsave(&garmin_data_p->lock, flags); 1065 spin_lock_irqsave(&garmin_data_p->lock, flags);
1066 garmin_data_p->flags |= CLEAR_HALT_REQUIRED; 1066 garmin_data_p->flags |= CLEAR_HALT_REQUIRED;
1067 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1067 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1088,7 +1088,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1088 unsigned char *buffer; 1088 unsigned char *buffer;
1089 int status; 1089 int status;
1090 1090
1091 dbg("%s - port %d, state %d", __FUNCTION__, port->number, 1091 dbg("%s - port %d, state %d", __func__, port->number,
1092 garmin_data_p->state); 1092 garmin_data_p->state);
1093 1093
1094 spin_lock_irqsave(&garmin_data_p->lock, flags); 1094 spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -1110,7 +1110,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1110 1110
1111 memcpy (buffer, buf, count); 1111 memcpy (buffer, buf, count);
1112 1112
1113 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer); 1113 usb_serial_debug_data(debug, &port->dev, __func__, count, buffer);
1114 1114
1115 usb_fill_bulk_urb (urb, serial->dev, 1115 usb_fill_bulk_urb (urb, serial->dev,
1116 usb_sndbulkpipe (serial->dev, 1116 usb_sndbulkpipe (serial->dev,
@@ -1134,7 +1134,7 @@ static int garmin_write_bulk (struct usb_serial_port *port,
1134 dev_err(&port->dev, 1134 dev_err(&port->dev,
1135 "%s - usb_submit_urb(write bulk) " 1135 "%s - usb_submit_urb(write bulk) "
1136 "failed with status = %d\n", 1136 "failed with status = %d\n",
1137 __FUNCTION__, status); 1137 __func__, status);
1138 count = status; 1138 count = status;
1139 } 1139 }
1140 1140
@@ -1154,7 +1154,7 @@ static int garmin_write (struct usb_serial_port *port,
1154 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1154 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1155 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt; 1155 __le32 *privpkt = (__le32 *)garmin_data_p->privpkt;
1156 1156
1157 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buf); 1157 usb_serial_debug_data(debug, &port->dev, __func__, count, buf);
1158 1158
1159 /* check for our private packets */ 1159 /* check for our private packets */
1160 if (count >= GARMIN_PKTHDR_LENGTH) { 1160 if (count >= GARMIN_PKTHDR_LENGTH) {
@@ -1172,7 +1172,7 @@ static int garmin_write (struct usb_serial_port *port,
1172 && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) { 1172 && GARMIN_LAYERID_PRIVATE == getLayerId(garmin_data_p->privpkt)) {
1173 1173
1174 dbg("%s - processing private request %d", 1174 dbg("%s - processing private request %d",
1175 __FUNCTION__, pktid); 1175 __func__, pktid);
1176 1176
1177 // drop all unfinished transfers 1177 // drop all unfinished transfers
1178 garmin_clear(garmin_data_p); 1178 garmin_clear(garmin_data_p);
@@ -1184,7 +1184,7 @@ static int garmin_write (struct usb_serial_port *port,
1184 return -EINVPKT; 1184 return -EINVPKT;
1185 debug = __le32_to_cpu(privpkt[3]); 1185 debug = __le32_to_cpu(privpkt[3]);
1186 dbg("%s - debug level set to 0x%X", 1186 dbg("%s - debug level set to 0x%X",
1187 __FUNCTION__, debug); 1187 __func__, debug);
1188 break; 1188 break;
1189 1189
1190 case PRIV_PKTID_SET_MODE: 1190 case PRIV_PKTID_SET_MODE:
@@ -1192,7 +1192,7 @@ static int garmin_write (struct usb_serial_port *port,
1192 return -EINVPKT; 1192 return -EINVPKT;
1193 garmin_data_p->mode = __le32_to_cpu(privpkt[3]); 1193 garmin_data_p->mode = __le32_to_cpu(privpkt[3]);
1194 dbg("%s - mode set to %d", 1194 dbg("%s - mode set to %d",
1195 __FUNCTION__, garmin_data_p->mode); 1195 __func__, garmin_data_p->mode);
1196 break; 1196 break;
1197 1197
1198 case PRIV_PKTID_INFO_REQ: 1198 case PRIV_PKTID_INFO_REQ:
@@ -1208,7 +1208,7 @@ static int garmin_write (struct usb_serial_port *port,
1208 return -EINVPKT; 1208 return -EINVPKT;
1209 initial_mode = __le32_to_cpu(privpkt[3]); 1209 initial_mode = __le32_to_cpu(privpkt[3]);
1210 dbg("%s - initial_mode set to %d", 1210 dbg("%s - initial_mode set to %d",
1211 __FUNCTION__, 1211 __func__,
1212 garmin_data_p->mode); 1212 garmin_data_p->mode);
1213 break; 1213 break;
1214 } 1214 }
@@ -1255,7 +1255,7 @@ static void garmin_read_process(struct garmin_data * garmin_data_p,
1255{ 1255{
1256 if (garmin_data_p->flags & FLAGS_DROP_DATA) { 1256 if (garmin_data_p->flags & FLAGS_DROP_DATA) {
1257 /* abort-transfer cmd is actice */ 1257 /* abort-transfer cmd is actice */
1258 dbg("%s - pkt dropped", __FUNCTION__); 1258 dbg("%s - pkt dropped", __func__);
1259 } else if (garmin_data_p->state != STATE_DISCONNECTED && 1259 } else if (garmin_data_p->state != STATE_DISCONNECTED &&
1260 garmin_data_p->state != STATE_RESET ) { 1260 garmin_data_p->state != STATE_RESET ) {
1261 1261
@@ -1293,21 +1293,21 @@ static void garmin_read_bulk_callback (struct urb *urb)
1293 int status = urb->status; 1293 int status = urb->status;
1294 int retval; 1294 int retval;
1295 1295
1296 dbg("%s - port %d", __FUNCTION__, port->number); 1296 dbg("%s - port %d", __func__, port->number);
1297 1297
1298 if (!serial) { 1298 if (!serial) {
1299 dbg("%s - bad serial pointer, exiting", __FUNCTION__); 1299 dbg("%s - bad serial pointer, exiting", __func__);
1300 return; 1300 return;
1301 } 1301 }
1302 1302
1303 if (status) { 1303 if (status) {
1304 dbg("%s - nonzero read bulk status received: %d", 1304 dbg("%s - nonzero read bulk status received: %d",
1305 __FUNCTION__, status); 1305 __func__, status);
1306 return; 1306 return;
1307 } 1307 }
1308 1308
1309 usb_serial_debug_data(debug, &port->dev, 1309 usb_serial_debug_data(debug, &port->dev,
1310 __FUNCTION__, urb->actual_length, data); 1310 __func__, urb->actual_length, data);
1311 1311
1312 garmin_read_process(garmin_data_p, data, urb->actual_length); 1312 garmin_read_process(garmin_data_p, data, urb->actual_length);
1313 1313
@@ -1320,7 +1320,7 @@ static void garmin_read_bulk_callback (struct urb *urb)
1320 if (retval) 1320 if (retval)
1321 dev_err(&port->dev, 1321 dev_err(&port->dev,
1322 "%s - failed resubmitting read urb, error %d\n", 1322 "%s - failed resubmitting read urb, error %d\n",
1323 __FUNCTION__, retval); 1323 __func__, retval);
1324 } else if (urb->actual_length > 0) { 1324 } else if (urb->actual_length > 0) {
1325 /* Continue trying to read until nothing more is received */ 1325 /* Continue trying to read until nothing more is received */
1326 if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) { 1326 if (0 == (garmin_data_p->flags & FLAGS_THROTTLED)) {
@@ -1328,10 +1328,10 @@ static void garmin_read_bulk_callback (struct urb *urb)
1328 if (retval) 1328 if (retval)
1329 dev_err(&port->dev, 1329 dev_err(&port->dev,
1330 "%s - failed resubmitting read urb, " 1330 "%s - failed resubmitting read urb, "
1331 "error %d\n", __FUNCTION__, retval); 1331 "error %d\n", __func__, retval);
1332 } 1332 }
1333 } else { 1333 } else {
1334 dbg("%s - end of bulk data", __FUNCTION__); 1334 dbg("%s - end of bulk data", __func__);
1335 spin_lock_irqsave(&garmin_data_p->lock, flags); 1335 spin_lock_irqsave(&garmin_data_p->lock, flags);
1336 garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE; 1336 garmin_data_p->flags &= ~FLAGS_BULK_IN_ACTIVE;
1337 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1337 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1359,22 +1359,22 @@ static void garmin_read_int_callback (struct urb *urb)
1359 case -ESHUTDOWN: 1359 case -ESHUTDOWN:
1360 /* this urb is terminated, clean up */ 1360 /* this urb is terminated, clean up */
1361 dbg("%s - urb shutting down with status: %d", 1361 dbg("%s - urb shutting down with status: %d",
1362 __FUNCTION__, status); 1362 __func__, status);
1363 return; 1363 return;
1364 default: 1364 default:
1365 dbg("%s - nonzero urb status received: %d", 1365 dbg("%s - nonzero urb status received: %d",
1366 __FUNCTION__, status); 1366 __func__, status);
1367 return; 1367 return;
1368 } 1368 }
1369 1369
1370 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 1370 usb_serial_debug_data(debug, &port->dev, __func__,
1371 urb->actual_length, urb->transfer_buffer); 1371 urb->actual_length, urb->transfer_buffer);
1372 1372
1373 if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) && 1373 if (urb->actual_length == sizeof(GARMIN_BULK_IN_AVAIL_REPLY) &&
1374 0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY, 1374 0 == memcmp(data, GARMIN_BULK_IN_AVAIL_REPLY,
1375 sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) { 1375 sizeof(GARMIN_BULK_IN_AVAIL_REPLY))) {
1376 1376
1377 dbg("%s - bulk data available.", __FUNCTION__); 1377 dbg("%s - bulk data available.", __func__);
1378 1378
1379 if (0 == (garmin_data_p->flags & FLAGS_BULK_IN_ACTIVE)) { 1379 if (0 == (garmin_data_p->flags & FLAGS_BULK_IN_ACTIVE)) {
1380 1380
@@ -1389,7 +1389,7 @@ static void garmin_read_int_callback (struct urb *urb)
1389 if (retval) { 1389 if (retval) {
1390 dev_err(&port->dev, 1390 dev_err(&port->dev,
1391 "%s - failed submitting read urb, error %d\n", 1391 "%s - failed submitting read urb, error %d\n",
1392 __FUNCTION__, retval); 1392 __func__, retval);
1393 } else { 1393 } else {
1394 spin_lock_irqsave(&garmin_data_p->lock, flags); 1394 spin_lock_irqsave(&garmin_data_p->lock, flags);
1395 garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE; 1395 garmin_data_p->flags |= FLAGS_BULK_IN_ACTIVE;
@@ -1417,14 +1417,14 @@ static void garmin_read_int_callback (struct urb *urb)
1417 = __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH)); 1417 = __le32_to_cpup((__le32*)(data+GARMIN_PKTHDR_LENGTH));
1418 1418
1419 dbg("%s - start-of-session reply seen - serial %u.", 1419 dbg("%s - start-of-session reply seen - serial %u.",
1420 __FUNCTION__, garmin_data_p->serial_num); 1420 __func__, garmin_data_p->serial_num);
1421 } 1421 }
1422 1422
1423 if (garmin_data_p->ignorePkts) { 1423 if (garmin_data_p->ignorePkts) {
1424 /* this reply belongs to a request generated by the driver, 1424 /* this reply belongs to a request generated by the driver,
1425 ignore it. */ 1425 ignore it. */
1426 dbg("%s - pkt ignored (%d)", 1426 dbg("%s - pkt ignored (%d)",
1427 __FUNCTION__, garmin_data_p->ignorePkts); 1427 __func__, garmin_data_p->ignorePkts);
1428 spin_lock_irqsave(&garmin_data_p->lock, flags); 1428 spin_lock_irqsave(&garmin_data_p->lock, flags);
1429 garmin_data_p->ignorePkts--; 1429 garmin_data_p->ignorePkts--;
1430 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1430 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1437,7 +1437,7 @@ static void garmin_read_int_callback (struct urb *urb)
1437 if (retval) 1437 if (retval)
1438 dev_err(&urb->dev->dev, 1438 dev_err(&urb->dev->dev,
1439 "%s - Error %d submitting interrupt urb\n", 1439 "%s - Error %d submitting interrupt urb\n",
1440 __FUNCTION__, retval); 1440 __func__, retval);
1441} 1441}
1442 1442
1443 1443
@@ -1473,7 +1473,7 @@ static void garmin_throttle (struct usb_serial_port *port)
1473 unsigned long flags; 1473 unsigned long flags;
1474 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1474 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1475 1475
1476 dbg("%s - port %d", __FUNCTION__, port->number); 1476 dbg("%s - port %d", __func__, port->number);
1477 /* set flag, data received will be put into a queue 1477 /* set flag, data received will be put into a queue
1478 for later processing */ 1478 for later processing */
1479 spin_lock_irqsave(&garmin_data_p->lock, flags); 1479 spin_lock_irqsave(&garmin_data_p->lock, flags);
@@ -1488,7 +1488,7 @@ static void garmin_unthrottle (struct usb_serial_port *port)
1488 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1488 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1489 int status; 1489 int status;
1490 1490
1491 dbg("%s - port %d", __FUNCTION__, port->number); 1491 dbg("%s - port %d", __func__, port->number);
1492 spin_lock_irqsave(&garmin_data_p->lock, flags); 1492 spin_lock_irqsave(&garmin_data_p->lock, flags);
1493 garmin_data_p->flags &= ~FLAGS_THROTTLED; 1493 garmin_data_p->flags &= ~FLAGS_THROTTLED;
1494 spin_unlock_irqrestore(&garmin_data_p->lock, flags); 1494 spin_unlock_irqrestore(&garmin_data_p->lock, flags);
@@ -1503,7 +1503,7 @@ static void garmin_unthrottle (struct usb_serial_port *port)
1503 if (status) 1503 if (status)
1504 dev_err(&port->dev, 1504 dev_err(&port->dev,
1505 "%s - failed resubmitting read urb, error %d\n", 1505 "%s - failed resubmitting read urb, error %d\n",
1506 __FUNCTION__, status); 1506 __func__, status);
1507 } 1507 }
1508} 1508}
1509 1509
@@ -1532,11 +1532,11 @@ static int garmin_attach (struct usb_serial *serial)
1532 struct usb_serial_port *port = serial->port[0]; 1532 struct usb_serial_port *port = serial->port[0];
1533 struct garmin_data * garmin_data_p = NULL; 1533 struct garmin_data * garmin_data_p = NULL;
1534 1534
1535 dbg("%s", __FUNCTION__); 1535 dbg("%s", __func__);
1536 1536
1537 garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL); 1537 garmin_data_p = kzalloc(sizeof(struct garmin_data), GFP_KERNEL);
1538 if (garmin_data_p == NULL) { 1538 if (garmin_data_p == NULL) {
1539 dev_err(&port->dev, "%s - Out of memory\n", __FUNCTION__); 1539 dev_err(&port->dev, "%s - Out of memory\n", __func__);
1540 return -ENOMEM; 1540 return -ENOMEM;
1541 } 1541 }
1542 init_timer(&garmin_data_p->timer); 1542 init_timer(&garmin_data_p->timer);
@@ -1561,7 +1561,7 @@ static void garmin_shutdown (struct usb_serial *serial)
1561 struct usb_serial_port *port = serial->port[0]; 1561 struct usb_serial_port *port = serial->port[0];
1562 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port); 1562 struct garmin_data * garmin_data_p = usb_get_serial_port_data(port);
1563 1563
1564 dbg("%s", __FUNCTION__); 1564 dbg("%s", __func__);
1565 1565
1566 usb_kill_urb (port->interrupt_in_urb); 1566 usb_kill_urb (port->interrupt_in_urb);
1567 del_timer_sync(&garmin_data_p->timer); 1567 del_timer_sync(&garmin_data_p->timer);