aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/keyspan.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/keyspan.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/keyspan.c')
-rw-r--r--drivers/usb/serial/keyspan.c234
1 files changed, 117 insertions, 117 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index ea7bba69f4da..857c5312555a 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -244,13 +244,13 @@ module_exit(keyspan_exit);
244 244
245static void keyspan_rx_throttle (struct usb_serial_port *port) 245static void keyspan_rx_throttle (struct usb_serial_port *port)
246{ 246{
247 dbg("%s - port %d", __FUNCTION__, port->number); 247 dbg("%s - port %d", __func__, port->number);
248} 248}
249 249
250 250
251static void keyspan_rx_unthrottle (struct usb_serial_port *port) 251static void keyspan_rx_unthrottle (struct usb_serial_port *port)
252{ 252{
253 dbg("%s - port %d", __FUNCTION__, port->number); 253 dbg("%s - port %d", __func__, port->number);
254} 254}
255 255
256 256
@@ -258,7 +258,7 @@ static void keyspan_break_ctl (struct usb_serial_port *port, int break_state)
258{ 258{
259 struct keyspan_port_private *p_priv; 259 struct keyspan_port_private *p_priv;
260 260
261 dbg("%s", __FUNCTION__); 261 dbg("%s", __func__);
262 262
263 p_priv = usb_get_serial_port_data(port); 263 p_priv = usb_get_serial_port_data(port);
264 264
@@ -280,7 +280,7 @@ static void keyspan_set_termios (struct usb_serial_port *port,
280 unsigned int cflag; 280 unsigned int cflag;
281 struct tty_struct *tty = port->tty; 281 struct tty_struct *tty = port->tty;
282 282
283 dbg("%s", __FUNCTION__); 283 dbg("%s", __func__);
284 284
285 p_priv = usb_get_serial_port_data(port); 285 p_priv = usb_get_serial_port_data(port);
286 d_details = p_priv->device_details; 286 d_details = p_priv->device_details;
@@ -377,7 +377,7 @@ static int keyspan_write(struct usb_serial_port *port,
377 } 377 }
378 378
379 dbg("%s - for port %d (%d chars), flip=%d", 379 dbg("%s - for port %d (%d chars), flip=%d",
380 __FUNCTION__, port->number, count, p_priv->out_flip); 380 __func__, port->number, count, p_priv->out_flip);
381 381
382 for (left = count; left > 0; left -= todo) { 382 for (left = count; left > 0; left -= todo) {
383 todo = left; 383 todo = left;
@@ -389,11 +389,11 @@ static int keyspan_write(struct usb_serial_port *port,
389 /* Check we have a valid urb/endpoint before we use it... */ 389 /* Check we have a valid urb/endpoint before we use it... */
390 if ((this_urb = p_priv->out_urbs[flip]) == NULL) { 390 if ((this_urb = p_priv->out_urbs[flip]) == NULL) {
391 /* no bulk out, so return 0 bytes written */ 391 /* no bulk out, so return 0 bytes written */
392 dbg("%s - no output urb :(", __FUNCTION__); 392 dbg("%s - no output urb :(", __func__);
393 return count; 393 return count;
394 } 394 }
395 395
396 dbg("%s - endpoint %d flip %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), flip); 396 dbg("%s - endpoint %d flip %d", __func__, usb_pipeendpoint(this_urb->pipe), flip);
397 397
398 if (this_urb->status == -EINPROGRESS) { 398 if (this_urb->status == -EINPROGRESS) {
399 if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ)) 399 if (time_before(jiffies, p_priv->tx_start_time[flip] + 10 * HZ))
@@ -435,13 +435,13 @@ static void usa26_indat_callback(struct urb *urb)
435 unsigned char *data = urb->transfer_buffer; 435 unsigned char *data = urb->transfer_buffer;
436 int status = urb->status; 436 int status = urb->status;
437 437
438 dbg ("%s", __FUNCTION__); 438 dbg ("%s", __func__);
439 439
440 endpoint = usb_pipeendpoint(urb->pipe); 440 endpoint = usb_pipeendpoint(urb->pipe);
441 441
442 if (status) { 442 if (status) {
443 dbg("%s - nonzero status: %x on endpoint %d.", 443 dbg("%s - nonzero status: %x on endpoint %d.",
444 __FUNCTION__, status, endpoint); 444 __func__, status, endpoint);
445 return; 445 return;
446 } 446 }
447 447
@@ -459,7 +459,7 @@ static void usa26_indat_callback(struct urb *urb)
459 } 459 }
460 } else { 460 } else {
461 /* some bytes had errors, every byte has status */ 461 /* some bytes had errors, every byte has status */
462 dbg("%s - RX error!!!!", __FUNCTION__); 462 dbg("%s - RX error!!!!", __func__);
463 for (i = 0; i + 1 < urb->actual_length; i += 2) { 463 for (i = 0; i + 1 < urb->actual_length; i += 2) {
464 int stat = data[i], flag = 0; 464 int stat = data[i], flag = 0;
465 if (stat & RXERROR_OVERRUN) 465 if (stat & RXERROR_OVERRUN)
@@ -479,7 +479,7 @@ static void usa26_indat_callback(struct urb *urb)
479 urb->dev = port->serial->dev; 479 urb->dev = port->serial->dev;
480 if (port->open_count) 480 if (port->open_count)
481 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 481 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
482 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 482 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
483 } 483 }
484 return; 484 return;
485} 485}
@@ -492,7 +492,7 @@ static void usa2x_outdat_callback(struct urb *urb)
492 492
493 port = (struct usb_serial_port *) urb->context; 493 port = (struct usb_serial_port *) urb->context;
494 p_priv = usb_get_serial_port_data(port); 494 p_priv = usb_get_serial_port_data(port);
495 dbg ("%s - urb %d", __FUNCTION__, urb == p_priv->out_urbs[1]); 495 dbg ("%s - urb %d", __func__, urb == p_priv->out_urbs[1]);
496 496
497 if (port->open_count) 497 if (port->open_count)
498 usb_serial_port_softint(port); 498 usb_serial_port_softint(port);
@@ -500,7 +500,7 @@ static void usa2x_outdat_callback(struct urb *urb)
500 500
501static void usa26_inack_callback(struct urb *urb) 501static void usa26_inack_callback(struct urb *urb)
502{ 502{
503 dbg ("%s", __FUNCTION__); 503 dbg ("%s", __func__);
504 504
505} 505}
506 506
@@ -513,7 +513,7 @@ static void usa26_outcont_callback(struct urb *urb)
513 p_priv = usb_get_serial_port_data(port); 513 p_priv = usb_get_serial_port_data(port);
514 514
515 if (p_priv->resend_cont) { 515 if (p_priv->resend_cont) {
516 dbg ("%s - sending setup", __FUNCTION__); 516 dbg ("%s - sending setup", __func__);
517 keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1); 517 keyspan_usa26_send_setup(port->serial, port, p_priv->resend_cont - 1);
518 } 518 }
519} 519}
@@ -531,11 +531,11 @@ static void usa26_instat_callback(struct urb *urb)
531 serial = (struct usb_serial *) urb->context; 531 serial = (struct usb_serial *) urb->context;
532 532
533 if (status) { 533 if (status) {
534 dbg("%s - nonzero status: %x", __FUNCTION__, status); 534 dbg("%s - nonzero status: %x", __func__, status);
535 return; 535 return;
536 } 536 }
537 if (urb->actual_length != 9) { 537 if (urb->actual_length != 9) {
538 dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length); 538 dbg("%s - %d byte report??", __func__, urb->actual_length);
539 goto exit; 539 goto exit;
540 } 540 }
541 541
@@ -543,7 +543,7 @@ static void usa26_instat_callback(struct urb *urb)
543 543
544#if 0 544#if 0
545 dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d", 545 dbg("%s - port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d",
546 __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff, 546 __func__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff,
547 msg->_txXoff, msg->rxEnabled, msg->controlResponse); 547 msg->_txXoff, msg->rxEnabled, msg->controlResponse);
548#endif 548#endif
549 549
@@ -552,7 +552,7 @@ static void usa26_instat_callback(struct urb *urb)
552 552
553 /* Check port number from message and retrieve private data */ 553 /* Check port number from message and retrieve private data */
554 if (msg->port >= serial->num_ports) { 554 if (msg->port >= serial->num_ports) {
555 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); 555 dbg ("%s - Unexpected port number %d", __func__, msg->port);
556 goto exit; 556 goto exit;
557 } 557 }
558 port = serial->port[msg->port]; 558 port = serial->port[msg->port];
@@ -576,14 +576,14 @@ static void usa26_instat_callback(struct urb *urb)
576 /* Resubmit urb so we continue receiving */ 576 /* Resubmit urb so we continue receiving */
577 urb->dev = serial->dev; 577 urb->dev = serial->dev;
578 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 578 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
579 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 579 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
580 } 580 }
581exit: ; 581exit: ;
582} 582}
583 583
584static void usa26_glocont_callback(struct urb *urb) 584static void usa26_glocont_callback(struct urb *urb)
585{ 585{
586 dbg ("%s", __FUNCTION__); 586 dbg ("%s", __func__);
587 587
588} 588}
589 589
@@ -597,7 +597,7 @@ static void usa28_indat_callback(struct urb *urb)
597 struct keyspan_port_private *p_priv; 597 struct keyspan_port_private *p_priv;
598 int status = urb->status; 598 int status = urb->status;
599 599
600 dbg ("%s", __FUNCTION__); 600 dbg ("%s", __func__);
601 601
602 port = (struct usb_serial_port *) urb->context; 602 port = (struct usb_serial_port *) urb->context;
603 p_priv = usb_get_serial_port_data(port); 603 p_priv = usb_get_serial_port_data(port);
@@ -609,7 +609,7 @@ static void usa28_indat_callback(struct urb *urb)
609 do { 609 do {
610 if (status) { 610 if (status) {
611 dbg("%s - nonzero status: %x on endpoint %d.", 611 dbg("%s - nonzero status: %x on endpoint %d.",
612 __FUNCTION__, status, usb_pipeendpoint(urb->pipe)); 612 __func__, status, usb_pipeendpoint(urb->pipe));
613 return; 613 return;
614 } 614 }
615 615
@@ -629,7 +629,7 @@ static void usa28_indat_callback(struct urb *urb)
629 urb->dev = port->serial->dev; 629 urb->dev = port->serial->dev;
630 if (port->open_count) 630 if (port->open_count)
631 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 631 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
632 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 632 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
633 } 633 }
634 p_priv->in_flip ^= 1; 634 p_priv->in_flip ^= 1;
635 635
@@ -639,7 +639,7 @@ static void usa28_indat_callback(struct urb *urb)
639 639
640static void usa28_inack_callback(struct urb *urb) 640static void usa28_inack_callback(struct urb *urb)
641{ 641{
642 dbg ("%s", __FUNCTION__); 642 dbg ("%s", __func__);
643} 643}
644 644
645static void usa28_outcont_callback(struct urb *urb) 645static void usa28_outcont_callback(struct urb *urb)
@@ -651,7 +651,7 @@ static void usa28_outcont_callback(struct urb *urb)
651 p_priv = usb_get_serial_port_data(port); 651 p_priv = usb_get_serial_port_data(port);
652 652
653 if (p_priv->resend_cont) { 653 if (p_priv->resend_cont) {
654 dbg ("%s - sending setup", __FUNCTION__); 654 dbg ("%s - sending setup", __func__);
655 keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1); 655 keyspan_usa28_send_setup(port->serial, port, p_priv->resend_cont - 1);
656 } 656 }
657} 657}
@@ -670,16 +670,16 @@ static void usa28_instat_callback(struct urb *urb)
670 serial = (struct usb_serial *) urb->context; 670 serial = (struct usb_serial *) urb->context;
671 671
672 if (status) { 672 if (status) {
673 dbg("%s - nonzero status: %x", __FUNCTION__, status); 673 dbg("%s - nonzero status: %x", __func__, status);
674 return; 674 return;
675 } 675 }
676 676
677 if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) { 677 if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) {
678 dbg("%s - bad length %d", __FUNCTION__, urb->actual_length); 678 dbg("%s - bad length %d", __func__, urb->actual_length);
679 goto exit; 679 goto exit;
680 } 680 }
681 681
682 /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__ 682 /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x", __func__
683 data[0], data[1], data[2], data[3], data[4], data[5], 683 data[0], data[1], data[2], data[3], data[4], data[5],
684 data[6], data[7], data[8], data[9], data[10], data[11]);*/ 684 data[6], data[7], data[8], data[9], data[10], data[11]);*/
685 685
@@ -689,7 +689,7 @@ static void usa28_instat_callback(struct urb *urb)
689 689
690 /* Check port number from message and retrieve private data */ 690 /* Check port number from message and retrieve private data */
691 if (msg->port >= serial->num_ports) { 691 if (msg->port >= serial->num_ports) {
692 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); 692 dbg ("%s - Unexpected port number %d", __func__, msg->port);
693 goto exit; 693 goto exit;
694 } 694 }
695 port = serial->port[msg->port]; 695 port = serial->port[msg->port];
@@ -713,14 +713,14 @@ static void usa28_instat_callback(struct urb *urb)
713 /* Resubmit urb so we continue receiving */ 713 /* Resubmit urb so we continue receiving */
714 urb->dev = serial->dev; 714 urb->dev = serial->dev;
715 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 715 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
716 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 716 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
717 } 717 }
718exit: ; 718exit: ;
719} 719}
720 720
721static void usa28_glocont_callback(struct urb *urb) 721static void usa28_glocont_callback(struct urb *urb)
722{ 722{
723 dbg ("%s", __FUNCTION__); 723 dbg ("%s", __func__);
724} 724}
725 725
726 726
@@ -731,7 +731,7 @@ static void usa49_glocont_callback(struct urb *urb)
731 struct keyspan_port_private *p_priv; 731 struct keyspan_port_private *p_priv;
732 int i; 732 int i;
733 733
734 dbg ("%s", __FUNCTION__); 734 dbg ("%s", __func__);
735 735
736 serial = (struct usb_serial *) urb->context; 736 serial = (struct usb_serial *) urb->context;
737 for (i = 0; i < serial->num_ports; ++i) { 737 for (i = 0; i < serial->num_ports; ++i) {
@@ -739,7 +739,7 @@ static void usa49_glocont_callback(struct urb *urb)
739 p_priv = usb_get_serial_port_data(port); 739 p_priv = usb_get_serial_port_data(port);
740 740
741 if (p_priv->resend_cont) { 741 if (p_priv->resend_cont) {
742 dbg ("%s - sending setup", __FUNCTION__); 742 dbg ("%s - sending setup", __func__);
743 keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1); 743 keyspan_usa49_send_setup(serial, port, p_priv->resend_cont - 1);
744 break; 744 break;
745 } 745 }
@@ -759,21 +759,21 @@ static void usa49_instat_callback(struct urb *urb)
759 int old_dcd_state; 759 int old_dcd_state;
760 int status = urb->status; 760 int status = urb->status;
761 761
762 dbg ("%s", __FUNCTION__); 762 dbg ("%s", __func__);
763 763
764 serial = (struct usb_serial *) urb->context; 764 serial = (struct usb_serial *) urb->context;
765 765
766 if (status) { 766 if (status) {
767 dbg("%s - nonzero status: %x", __FUNCTION__, status); 767 dbg("%s - nonzero status: %x", __func__, status);
768 return; 768 return;
769 } 769 }
770 770
771 if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) { 771 if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) {
772 dbg("%s - bad length %d", __FUNCTION__, urb->actual_length); 772 dbg("%s - bad length %d", __func__, urb->actual_length);
773 goto exit; 773 goto exit;
774 } 774 }
775 775
776 /*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __FUNCTION__, 776 /*dbg(" %x %x %x %x %x %x %x %x %x %x %x", __func__,
777 data[0], data[1], data[2], data[3], data[4], data[5], 777 data[0], data[1], data[2], data[3], data[4], data[5],
778 data[6], data[7], data[8], data[9], data[10]);*/ 778 data[6], data[7], data[8], data[9], data[10]);*/
779 779
@@ -782,7 +782,7 @@ static void usa49_instat_callback(struct urb *urb)
782 782
783 /* Check port number from message and retrieve private data */ 783 /* Check port number from message and retrieve private data */
784 if (msg->portNumber >= serial->num_ports) { 784 if (msg->portNumber >= serial->num_ports) {
785 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->portNumber); 785 dbg ("%s - Unexpected port number %d", __func__, msg->portNumber);
786 goto exit; 786 goto exit;
787 } 787 }
788 port = serial->port[msg->portNumber]; 788 port = serial->port[msg->portNumber];
@@ -807,14 +807,14 @@ static void usa49_instat_callback(struct urb *urb)
807 urb->dev = serial->dev; 807 urb->dev = serial->dev;
808 808
809 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 809 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
810 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 810 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
811 } 811 }
812exit: ; 812exit: ;
813} 813}
814 814
815static void usa49_inack_callback(struct urb *urb) 815static void usa49_inack_callback(struct urb *urb)
816{ 816{
817 dbg ("%s", __FUNCTION__); 817 dbg ("%s", __func__);
818} 818}
819 819
820static void usa49_indat_callback(struct urb *urb) 820static void usa49_indat_callback(struct urb *urb)
@@ -826,12 +826,12 @@ static void usa49_indat_callback(struct urb *urb)
826 unsigned char *data = urb->transfer_buffer; 826 unsigned char *data = urb->transfer_buffer;
827 int status = urb->status; 827 int status = urb->status;
828 828
829 dbg ("%s", __FUNCTION__); 829 dbg ("%s", __func__);
830 830
831 endpoint = usb_pipeendpoint(urb->pipe); 831 endpoint = usb_pipeendpoint(urb->pipe);
832 832
833 if (status) { 833 if (status) {
834 dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__, 834 dbg("%s - nonzero status: %x on endpoint %d.", __func__,
835 status, endpoint); 835 status, endpoint);
836 return; 836 return;
837 } 837 }
@@ -866,7 +866,7 @@ static void usa49_indat_callback(struct urb *urb)
866 urb->dev = port->serial->dev; 866 urb->dev = port->serial->dev;
867 if (port->open_count) 867 if (port->open_count)
868 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 868 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
869 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 869 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
870 } 870 }
871} 871}
872 872
@@ -879,12 +879,12 @@ static void usa49wg_indat_callback(struct urb *urb)
879 unsigned char *data = urb->transfer_buffer; 879 unsigned char *data = urb->transfer_buffer;
880 int status = urb->status; 880 int status = urb->status;
881 881
882 dbg ("%s", __FUNCTION__); 882 dbg ("%s", __func__);
883 883
884 serial = urb->context; 884 serial = urb->context;
885 885
886 if (status) { 886 if (status) {
887 dbg("%s - nonzero status: %x", __FUNCTION__, status); 887 dbg("%s - nonzero status: %x", __func__, status);
888 return; 888 return;
889 } 889 }
890 890
@@ -898,7 +898,7 @@ static void usa49wg_indat_callback(struct urb *urb)
898 /* Check port number from message*/ 898 /* Check port number from message*/
899 if (data[i] >= serial->num_ports) { 899 if (data[i] >= serial->num_ports) {
900 dbg ("%s - Unexpected port number %d", 900 dbg ("%s - Unexpected port number %d",
901 __FUNCTION__, data[i]); 901 __func__, data[i]);
902 return; 902 return;
903 } 903 }
904 port = serial->port[data[i++]]; 904 port = serial->port[data[i++]];
@@ -944,13 +944,13 @@ static void usa49wg_indat_callback(struct urb *urb)
944 944
945 err = usb_submit_urb(urb, GFP_ATOMIC); 945 err = usb_submit_urb(urb, GFP_ATOMIC);
946 if (err != 0) 946 if (err != 0)
947 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 947 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
948} 948}
949 949
950/* not used, usa-49 doesn't have per-port control endpoints */ 950/* not used, usa-49 doesn't have per-port control endpoints */
951static void usa49_outcont_callback(struct urb *urb) 951static void usa49_outcont_callback(struct urb *urb)
952{ 952{
953 dbg ("%s", __FUNCTION__); 953 dbg ("%s", __func__);
954} 954}
955 955
956static void usa90_indat_callback(struct urb *urb) 956static void usa90_indat_callback(struct urb *urb)
@@ -963,13 +963,13 @@ static void usa90_indat_callback(struct urb *urb)
963 unsigned char *data = urb->transfer_buffer; 963 unsigned char *data = urb->transfer_buffer;
964 int status = urb->status; 964 int status = urb->status;
965 965
966 dbg ("%s", __FUNCTION__); 966 dbg ("%s", __func__);
967 967
968 endpoint = usb_pipeendpoint(urb->pipe); 968 endpoint = usb_pipeendpoint(urb->pipe);
969 969
970 if (status) { 970 if (status) {
971 dbg("%s - nonzero status: %x on endpoint %d.", 971 dbg("%s - nonzero status: %x on endpoint %d.",
972 __FUNCTION__, status, endpoint); 972 __func__, status, endpoint);
973 return; 973 return;
974 } 974 }
975 975
@@ -1000,7 +1000,7 @@ static void usa90_indat_callback(struct urb *urb)
1000 } 1000 }
1001 else { 1001 else {
1002 /* some bytes had errors, every byte has status */ 1002 /* some bytes had errors, every byte has status */
1003 dbg("%s - RX error!!!!", __FUNCTION__); 1003 dbg("%s - RX error!!!!", __func__);
1004 for (i = 0; i + 1 < urb->actual_length; i += 2) { 1004 for (i = 0; i + 1 < urb->actual_length; i += 2) {
1005 int stat = data[i], flag = 0; 1005 int stat = data[i], flag = 0;
1006 if (stat & RXERROR_OVERRUN) 1006 if (stat & RXERROR_OVERRUN)
@@ -1021,7 +1021,7 @@ static void usa90_indat_callback(struct urb *urb)
1021 urb->dev = port->serial->dev; 1021 urb->dev = port->serial->dev;
1022 if (port->open_count) 1022 if (port->open_count)
1023 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 1023 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
1024 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 1024 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
1025 } 1025 }
1026 return; 1026 return;
1027} 1027}
@@ -1040,11 +1040,11 @@ static void usa90_instat_callback(struct urb *urb)
1040 serial = (struct usb_serial *) urb->context; 1040 serial = (struct usb_serial *) urb->context;
1041 1041
1042 if (status) { 1042 if (status) {
1043 dbg("%s - nonzero status: %x", __FUNCTION__, status); 1043 dbg("%s - nonzero status: %x", __func__, status);
1044 return; 1044 return;
1045 } 1045 }
1046 if (urb->actual_length < 14) { 1046 if (urb->actual_length < 14) {
1047 dbg("%s - %d byte report??", __FUNCTION__, urb->actual_length); 1047 dbg("%s - %d byte report??", __func__, urb->actual_length);
1048 goto exit; 1048 goto exit;
1049 } 1049 }
1050 1050
@@ -1073,7 +1073,7 @@ static void usa90_instat_callback(struct urb *urb)
1073 /* Resubmit urb so we continue receiving */ 1073 /* Resubmit urb so we continue receiving */
1074 urb->dev = serial->dev; 1074 urb->dev = serial->dev;
1075 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) { 1075 if ((err = usb_submit_urb(urb, GFP_ATOMIC)) != 0) {
1076 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 1076 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
1077 } 1077 }
1078exit: 1078exit:
1079 ; 1079 ;
@@ -1088,7 +1088,7 @@ static void usa90_outcont_callback(struct urb *urb)
1088 p_priv = usb_get_serial_port_data(port); 1088 p_priv = usb_get_serial_port_data(port);
1089 1089
1090 if (p_priv->resend_cont) { 1090 if (p_priv->resend_cont) {
1091 dbg ("%s - sending setup", __FUNCTION__); 1091 dbg ("%s - sending setup", __func__);
1092 keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1); 1092 keyspan_usa90_send_setup(port->serial, port, p_priv->resend_cont - 1);
1093 } 1093 }
1094} 1094}
@@ -1105,17 +1105,17 @@ static void usa67_instat_callback(struct urb *urb)
1105 int old_dcd_state; 1105 int old_dcd_state;
1106 int status = urb->status; 1106 int status = urb->status;
1107 1107
1108 dbg ("%s", __FUNCTION__); 1108 dbg ("%s", __func__);
1109 1109
1110 serial = urb->context; 1110 serial = urb->context;
1111 1111
1112 if (status) { 1112 if (status) {
1113 dbg("%s - nonzero status: %x", __FUNCTION__, status); 1113 dbg("%s - nonzero status: %x", __func__, status);
1114 return; 1114 return;
1115 } 1115 }
1116 1116
1117 if (urb->actual_length != sizeof(struct keyspan_usa67_portStatusMessage)) { 1117 if (urb->actual_length != sizeof(struct keyspan_usa67_portStatusMessage)) {
1118 dbg("%s - bad length %d", __FUNCTION__, urb->actual_length); 1118 dbg("%s - bad length %d", __func__, urb->actual_length);
1119 return; 1119 return;
1120 } 1120 }
1121 1121
@@ -1125,7 +1125,7 @@ static void usa67_instat_callback(struct urb *urb)
1125 1125
1126 /* Check port number from message and retrieve private data */ 1126 /* Check port number from message and retrieve private data */
1127 if (msg->port >= serial->num_ports) { 1127 if (msg->port >= serial->num_ports) {
1128 dbg ("%s - Unexpected port number %d", __FUNCTION__, msg->port); 1128 dbg ("%s - Unexpected port number %d", __func__, msg->port);
1129 return; 1129 return;
1130 } 1130 }
1131 1131
@@ -1149,7 +1149,7 @@ static void usa67_instat_callback(struct urb *urb)
1149 urb->dev = serial->dev; 1149 urb->dev = serial->dev;
1150 err = usb_submit_urb(urb, GFP_ATOMIC); 1150 err = usb_submit_urb(urb, GFP_ATOMIC);
1151 if (err != 0) 1151 if (err != 0)
1152 dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err); 1152 dbg("%s - resubmit read urb failed. (%d)", __func__, err);
1153} 1153}
1154 1154
1155static void usa67_glocont_callback(struct urb *urb) 1155static void usa67_glocont_callback(struct urb *urb)
@@ -1159,7 +1159,7 @@ static void usa67_glocont_callback(struct urb *urb)
1159 struct keyspan_port_private *p_priv; 1159 struct keyspan_port_private *p_priv;
1160 int i; 1160 int i;
1161 1161
1162 dbg ("%s", __FUNCTION__); 1162 dbg ("%s", __func__);
1163 1163
1164 serial = urb->context; 1164 serial = urb->context;
1165 for (i = 0; i < serial->num_ports; ++i) { 1165 for (i = 0; i < serial->num_ports; ++i) {
@@ -1167,7 +1167,7 @@ static void usa67_glocont_callback(struct urb *urb)
1167 p_priv = usb_get_serial_port_data(port); 1167 p_priv = usb_get_serial_port_data(port);
1168 1168
1169 if (p_priv->resend_cont) { 1169 if (p_priv->resend_cont) {
1170 dbg ("%s - sending setup", __FUNCTION__); 1170 dbg ("%s - sending setup", __func__);
1171 keyspan_usa67_send_setup(serial, port, 1171 keyspan_usa67_send_setup(serial, port,
1172 p_priv->resend_cont - 1); 1172 p_priv->resend_cont - 1);
1173 break; 1173 break;
@@ -1183,7 +1183,7 @@ static int keyspan_write_room (struct usb_serial_port *port)
1183 int data_len; 1183 int data_len;
1184 struct urb *this_urb; 1184 struct urb *this_urb;
1185 1185
1186 dbg("%s", __FUNCTION__); 1186 dbg("%s", __func__);
1187 p_priv = usb_get_serial_port_data(port); 1187 p_priv = usb_get_serial_port_data(port);
1188 d_details = p_priv->device_details; 1188 d_details = p_priv->device_details;
1189 1189
@@ -1228,7 +1228,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
1228 p_priv = usb_get_serial_port_data(port); 1228 p_priv = usb_get_serial_port_data(port);
1229 d_details = p_priv->device_details; 1229 d_details = p_priv->device_details;
1230 1230
1231 dbg("%s - port%d.", __FUNCTION__, port->number); 1231 dbg("%s - port%d.", __func__, port->number);
1232 1232
1233 /* Set some sane defaults */ 1233 /* Set some sane defaults */
1234 p_priv->rts_state = 1; 1234 p_priv->rts_state = 1;
@@ -1253,7 +1253,7 @@ static int keyspan_open (struct usb_serial_port *port, struct file *filp)
1253 usb_clear_halt(urb->dev, urb->pipe); 1253 usb_clear_halt(urb->dev, urb->pipe);
1254 1254
1255 if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) { 1255 if ((err = usb_submit_urb(urb, GFP_KERNEL)) != 0) {
1256 dbg("%s - submit urb %d failed (%d)", __FUNCTION__, i, err); 1256 dbg("%s - submit urb %d failed (%d)", __func__, i, err);
1257 } 1257 }
1258 } 1258 }
1259 1259
@@ -1305,7 +1305,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
1305 struct keyspan_serial_private *s_priv; 1305 struct keyspan_serial_private *s_priv;
1306 struct keyspan_port_private *p_priv; 1306 struct keyspan_port_private *p_priv;
1307 1307
1308 dbg("%s", __FUNCTION__); 1308 dbg("%s", __func__);
1309 s_priv = usb_get_serial_data(serial); 1309 s_priv = usb_get_serial_data(serial);
1310 p_priv = usb_get_serial_port_data(port); 1310 p_priv = usb_get_serial_port_data(port);
1311 1311
@@ -1320,7 +1320,7 @@ static void keyspan_close(struct usb_serial_port *port, struct file *filp)
1320 } 1320 }
1321 1321
1322 /*while (p_priv->outcont_urb->status == -EINPROGRESS) { 1322 /*while (p_priv->outcont_urb->status == -EINPROGRESS) {
1323 dbg("%s - urb in progress", __FUNCTION__); 1323 dbg("%s - urb in progress", __func__);
1324 }*/ 1324 }*/
1325 1325
1326 p_priv->out_flip = 0; 1326 p_priv->out_flip = 0;
@@ -1484,10 +1484,10 @@ static struct urb *keyspan_setup_urb (struct usb_serial *serial, int endpoint,
1484 if (endpoint == -1) 1484 if (endpoint == -1)
1485 return NULL; /* endpoint not needed */ 1485 return NULL; /* endpoint not needed */
1486 1486
1487 dbg ("%s - alloc for endpoint %d.", __FUNCTION__, endpoint); 1487 dbg ("%s - alloc for endpoint %d.", __func__, endpoint);
1488 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ 1488 urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */
1489 if (urb == NULL) { 1489 if (urb == NULL) {
1490 dbg ("%s - alloc for endpoint %d failed.", __FUNCTION__, endpoint); 1490 dbg ("%s - alloc for endpoint %d failed.", __func__, endpoint);
1491 return NULL; 1491 return NULL;
1492 } 1492 }
1493 1493
@@ -1588,7 +1588,7 @@ static void keyspan_setup_urbs(struct usb_serial *serial)
1588 struct callbacks *cback; 1588 struct callbacks *cback;
1589 int endp; 1589 int endp;
1590 1590
1591 dbg ("%s", __FUNCTION__); 1591 dbg ("%s", __func__);
1592 1592
1593 s_priv = usb_get_serial_data(serial); 1593 s_priv = usb_get_serial_data(serial);
1594 d_details = s_priv->device_details; 1594 d_details = s_priv->device_details;
@@ -1662,7 +1662,7 @@ static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1662 div, /* divisor */ 1662 div, /* divisor */
1663 cnt; /* inverse of divisor (programmed into 8051) */ 1663 cnt; /* inverse of divisor (programmed into 8051) */
1664 1664
1665 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1665 dbg ("%s - %d.", __func__, baud_rate);
1666 1666
1667 /* prevent divide by zero... */ 1667 /* prevent divide by zero... */
1668 if( (b16 = (baud_rate * 16L)) == 0) { 1668 if( (b16 = (baud_rate * 16L)) == 0) {
@@ -1695,7 +1695,7 @@ static int keyspan_usa19_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1695 *rate_hi = (u8) ((cnt >> 8) & 0xff); 1695 *rate_hi = (u8) ((cnt >> 8) & 0xff);
1696 } 1696 }
1697 if (rate_low && rate_hi) { 1697 if (rate_low && rate_hi) {
1698 dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low); 1698 dbg ("%s - %d %02x %02x.", __func__, baud_rate, *rate_hi, *rate_low);
1699 } 1699 }
1700 1700
1701 return (KEYSPAN_BAUD_RATE_OK); 1701 return (KEYSPAN_BAUD_RATE_OK);
@@ -1708,7 +1708,7 @@ static int keyspan_usa19hs_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1708 u32 b16, /* baud rate times 16 (actual rate used internally) */ 1708 u32 b16, /* baud rate times 16 (actual rate used internally) */
1709 div; /* divisor */ 1709 div; /* divisor */
1710 1710
1711 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1711 dbg ("%s - %d.", __func__, baud_rate);
1712 1712
1713 /* prevent divide by zero... */ 1713 /* prevent divide by zero... */
1714 if( (b16 = (baud_rate * 16L)) == 0) 1714 if( (b16 = (baud_rate * 16L)) == 0)
@@ -1731,7 +1731,7 @@ static int keyspan_usa19hs_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1731 *rate_hi = (u8) ((div >> 8) & 0xff); 1731 *rate_hi = (u8) ((div >> 8) & 0xff);
1732 1732
1733 if (rate_low && rate_hi) 1733 if (rate_low && rate_hi)
1734 dbg ("%s - %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low); 1734 dbg ("%s - %d %02x %02x.", __func__, baud_rate, *rate_hi, *rate_low);
1735 1735
1736 return (KEYSPAN_BAUD_RATE_OK); 1736 return (KEYSPAN_BAUD_RATE_OK);
1737} 1737}
@@ -1748,7 +1748,7 @@ static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1748 u8 best_prescaler; 1748 u8 best_prescaler;
1749 int i; 1749 int i;
1750 1750
1751 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1751 dbg ("%s - %d.", __func__, baud_rate);
1752 1752
1753 /* prevent divide by zero */ 1753 /* prevent divide by zero */
1754 if( (b16 = baud_rate * 16L) == 0) { 1754 if( (b16 = baud_rate * 16L) == 0) {
@@ -1796,7 +1796,7 @@ static int keyspan_usa19w_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1796 } 1796 }
1797 if (prescaler) { 1797 if (prescaler) {
1798 *prescaler = best_prescaler; 1798 *prescaler = best_prescaler;
1799 /* dbg("%s - %d %d", __FUNCTION__, *prescaler, div); */ 1799 /* dbg("%s - %d %d", __func__, *prescaler, div); */
1800 } 1800 }
1801 return (KEYSPAN_BAUD_RATE_OK); 1801 return (KEYSPAN_BAUD_RATE_OK);
1802} 1802}
@@ -1809,7 +1809,7 @@ static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1809 div, /* divisor */ 1809 div, /* divisor */
1810 cnt; /* inverse of divisor (programmed into 8051) */ 1810 cnt; /* inverse of divisor (programmed into 8051) */
1811 1811
1812 dbg ("%s - %d.", __FUNCTION__, baud_rate); 1812 dbg ("%s - %d.", __func__, baud_rate);
1813 1813
1814 /* prevent divide by zero */ 1814 /* prevent divide by zero */
1815 if ((b16 = baud_rate * 16L) == 0) 1815 if ((b16 = baud_rate * 16L) == 0)
@@ -1848,7 +1848,7 @@ static int keyspan_usa28_calc_baud(u32 baud_rate, u32 baudclk, u8 *rate_hi,
1848 if (rate_hi) { 1848 if (rate_hi) {
1849 *rate_hi = (u8) ((cnt >> 8) & 0xff); 1849 *rate_hi = (u8) ((cnt >> 8) & 0xff);
1850 } 1850 }
1851 dbg ("%s - %d OK.", __FUNCTION__, baud_rate); 1851 dbg ("%s - %d OK.", __func__, baud_rate);
1852 return (KEYSPAN_BAUD_RATE_OK); 1852 return (KEYSPAN_BAUD_RATE_OK);
1853} 1853}
1854 1854
@@ -1864,7 +1864,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1864 struct urb *this_urb; 1864 struct urb *this_urb;
1865 int device_port, err; 1865 int device_port, err;
1866 1866
1867 dbg ("%s reset=%d", __FUNCTION__, reset_port); 1867 dbg ("%s reset=%d", __func__, reset_port);
1868 1868
1869 s_priv = usb_get_serial_data(serial); 1869 s_priv = usb_get_serial_data(serial);
1870 p_priv = usb_get_serial_port_data(port); 1870 p_priv = usb_get_serial_port_data(port);
@@ -1874,11 +1874,11 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1874 outcont_urb = d_details->outcont_endpoints[port->number]; 1874 outcont_urb = d_details->outcont_endpoints[port->number];
1875 this_urb = p_priv->outcont_urb; 1875 this_urb = p_priv->outcont_urb;
1876 1876
1877 dbg("%s - endpoint %d", __FUNCTION__, usb_pipeendpoint(this_urb->pipe)); 1877 dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));
1878 1878
1879 /* Make sure we have an urb then send the message */ 1879 /* Make sure we have an urb then send the message */
1880 if (this_urb == NULL) { 1880 if (this_urb == NULL) {
1881 dbg("%s - oops no urb.", __FUNCTION__); 1881 dbg("%s - oops no urb.", __func__);
1882 return -1; 1882 return -1;
1883 } 1883 }
1884 1884
@@ -1887,7 +1887,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1887 if ((reset_port + 1) > p_priv->resend_cont) 1887 if ((reset_port + 1) > p_priv->resend_cont)
1888 p_priv->resend_cont = reset_port + 1; 1888 p_priv->resend_cont = reset_port + 1;
1889 if (this_urb->status == -EINPROGRESS) { 1889 if (this_urb->status == -EINPROGRESS) {
1890 /* dbg ("%s - already writing", __FUNCTION__); */ 1890 /* dbg ("%s - already writing", __func__); */
1891 mdelay(5); 1891 mdelay(5);
1892 return(-1); 1892 return(-1);
1893 } 1893 }
@@ -1901,7 +1901,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1901 if (d_details->calculate_baud_rate 1901 if (d_details->calculate_baud_rate
1902 (p_priv->baud, d_details->baudclk, &msg.baudHi, 1902 (p_priv->baud, d_details->baudclk, &msg.baudHi,
1903 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 1903 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
1904 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 1904 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
1905 p_priv->baud); 1905 p_priv->baud);
1906 msg.baudLo = 0; 1906 msg.baudLo = 0;
1907 msg.baudHi = 125; /* Values for 9600 baud */ 1907 msg.baudHi = 125; /* Values for 9600 baud */
@@ -1996,11 +1996,11 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
1996 1996
1997 this_urb->dev = serial->dev; 1997 this_urb->dev = serial->dev;
1998 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 1998 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
1999 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err); 1999 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2000 } 2000 }
2001#if 0 2001#if 0
2002 else { 2002 else {
2003 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__ 2003 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __func__
2004 outcont_urb, this_urb->transfer_buffer_length, 2004 outcont_urb, this_urb->transfer_buffer_length,
2005 usb_pipeendpoint(this_urb->pipe)); 2005 usb_pipeendpoint(this_urb->pipe));
2006 } 2006 }
@@ -2020,7 +2020,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2020 struct urb *this_urb; 2020 struct urb *this_urb;
2021 int device_port, err; 2021 int device_port, err;
2022 2022
2023 dbg ("%s", __FUNCTION__); 2023 dbg ("%s", __func__);
2024 2024
2025 s_priv = usb_get_serial_data(serial); 2025 s_priv = usb_get_serial_data(serial);
2026 p_priv = usb_get_serial_port_data(port); 2026 p_priv = usb_get_serial_port_data(port);
@@ -2029,7 +2029,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2029 2029
2030 /* only do something if we have a bulk out endpoint */ 2030 /* only do something if we have a bulk out endpoint */
2031 if ((this_urb = p_priv->outcont_urb) == NULL) { 2031 if ((this_urb = p_priv->outcont_urb) == NULL) {
2032 dbg("%s - oops no urb.", __FUNCTION__); 2032 dbg("%s - oops no urb.", __func__);
2033 return -1; 2033 return -1;
2034 } 2034 }
2035 2035
@@ -2038,7 +2038,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2038 if ((reset_port + 1) > p_priv->resend_cont) 2038 if ((reset_port + 1) > p_priv->resend_cont)
2039 p_priv->resend_cont = reset_port + 1; 2039 p_priv->resend_cont = reset_port + 1;
2040 if (this_urb->status == -EINPROGRESS) { 2040 if (this_urb->status == -EINPROGRESS) {
2041 dbg ("%s already writing", __FUNCTION__); 2041 dbg ("%s already writing", __func__);
2042 mdelay(5); 2042 mdelay(5);
2043 return(-1); 2043 return(-1);
2044 } 2044 }
@@ -2048,7 +2048,7 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2048 msg.setBaudRate = 1; 2048 msg.setBaudRate = 1;
2049 if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk, 2049 if (d_details->calculate_baud_rate(p_priv->baud, d_details->baudclk,
2050 &msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 2050 &msg.baudHi, &msg.baudLo, NULL, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
2051 dbg("%s - Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud); 2051 dbg("%s - Invalid baud rate requested %d.", __func__, p_priv->baud);
2052 msg.baudLo = 0xff; 2052 msg.baudLo = 0xff;
2053 msg.baudHi = 0xb2; /* Values for 9600 baud */ 2053 msg.baudHi = 0xb2; /* Values for 9600 baud */
2054 } 2054 }
@@ -2122,11 +2122,11 @@ static int keyspan_usa28_send_setup(struct usb_serial *serial,
2122 2122
2123 this_urb->dev = serial->dev; 2123 this_urb->dev = serial->dev;
2124 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2124 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2125 dbg("%s - usb_submit_urb(setup) failed", __FUNCTION__); 2125 dbg("%s - usb_submit_urb(setup) failed", __func__);
2126 } 2126 }
2127#if 0 2127#if 0
2128 else { 2128 else {
2129 dbg("%s - usb_submit_urb(setup) OK %d bytes", __FUNCTION__, 2129 dbg("%s - usb_submit_urb(setup) OK %d bytes", __func__,
2130 this_urb->transfer_buffer_length); 2130 this_urb->transfer_buffer_length);
2131 } 2131 }
2132#endif 2132#endif
@@ -2146,7 +2146,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2146 struct urb *this_urb; 2146 struct urb *this_urb;
2147 int err, device_port; 2147 int err, device_port;
2148 2148
2149 dbg ("%s", __FUNCTION__); 2149 dbg ("%s", __func__);
2150 2150
2151 s_priv = usb_get_serial_data(serial); 2151 s_priv = usb_get_serial_data(serial);
2152 p_priv = usb_get_serial_port_data(port); 2152 p_priv = usb_get_serial_port_data(port);
@@ -2157,11 +2157,11 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2157 /* Work out which port within the device is being setup */ 2157 /* Work out which port within the device is being setup */
2158 device_port = port->number - port->serial->minor; 2158 device_port = port->number - port->serial->minor;
2159 2159
2160 dbg("%s - endpoint %d port %d (%d)",__FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port); 2160 dbg("%s - endpoint %d port %d (%d)",__func__, usb_pipeendpoint(this_urb->pipe), port->number, device_port);
2161 2161
2162 /* Make sure we have an urb then send the message */ 2162 /* Make sure we have an urb then send the message */
2163 if (this_urb == NULL) { 2163 if (this_urb == NULL) {
2164 dbg("%s - oops no urb for port %d.", __FUNCTION__, port->number); 2164 dbg("%s - oops no urb for port %d.", __func__, port->number);
2165 return -1; 2165 return -1;
2166 } 2166 }
2167 2167
@@ -2171,7 +2171,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2171 p_priv->resend_cont = reset_port + 1; 2171 p_priv->resend_cont = reset_port + 1;
2172 2172
2173 if (this_urb->status == -EINPROGRESS) { 2173 if (this_urb->status == -EINPROGRESS) {
2174 /* dbg ("%s - already writing", __FUNCTION__); */ 2174 /* dbg ("%s - already writing", __func__); */
2175 mdelay(5); 2175 mdelay(5);
2176 return(-1); 2176 return(-1);
2177 } 2177 }
@@ -2188,7 +2188,7 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2188 if (d_details->calculate_baud_rate 2188 if (d_details->calculate_baud_rate
2189 (p_priv->baud, d_details->baudclk, &msg.baudHi, 2189 (p_priv->baud, d_details->baudclk, &msg.baudHi,
2190 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 2190 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
2191 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 2191 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
2192 p_priv->baud); 2192 p_priv->baud);
2193 msg.baudLo = 0; 2193 msg.baudLo = 0;
2194 msg.baudHi = 125; /* Values for 9600 baud */ 2194 msg.baudHi = 125; /* Values for 9600 baud */
@@ -2307,11 +2307,11 @@ static int keyspan_usa49_send_setup(struct usb_serial *serial,
2307 this_urb->dev = serial->dev; 2307 this_urb->dev = serial->dev;
2308 } 2308 }
2309 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2309 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2310 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err); 2310 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2311 } 2311 }
2312#if 0 2312#if 0
2313 else { 2313 else {
2314 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__, 2314 dbg("%s - usb_submit_urb(%d) OK %d bytes (end %d)", __func__,
2315 outcont_urb, this_urb->transfer_buffer_length, 2315 outcont_urb, this_urb->transfer_buffer_length,
2316 usb_pipeendpoint(this_urb->pipe)); 2316 usb_pipeendpoint(this_urb->pipe));
2317 } 2317 }
@@ -2332,7 +2332,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2332 int err; 2332 int err;
2333 u8 prescaler; 2333 u8 prescaler;
2334 2334
2335 dbg ("%s", __FUNCTION__); 2335 dbg ("%s", __func__);
2336 2336
2337 s_priv = usb_get_serial_data(serial); 2337 s_priv = usb_get_serial_data(serial);
2338 p_priv = usb_get_serial_port_data(port); 2338 p_priv = usb_get_serial_port_data(port);
@@ -2340,7 +2340,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2340 2340
2341 /* only do something if we have a bulk out endpoint */ 2341 /* only do something if we have a bulk out endpoint */
2342 if ((this_urb = p_priv->outcont_urb) == NULL) { 2342 if ((this_urb = p_priv->outcont_urb) == NULL) {
2343 dbg("%s - oops no urb.", __FUNCTION__); 2343 dbg("%s - oops no urb.", __func__);
2344 return -1; 2344 return -1;
2345 } 2345 }
2346 2346
@@ -2349,7 +2349,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2349 if ((reset_port + 1) > p_priv->resend_cont) 2349 if ((reset_port + 1) > p_priv->resend_cont)
2350 p_priv->resend_cont = reset_port + 1; 2350 p_priv->resend_cont = reset_port + 1;
2351 if (this_urb->status == -EINPROGRESS) { 2351 if (this_urb->status == -EINPROGRESS) {
2352 dbg ("%s already writing", __FUNCTION__); 2352 dbg ("%s already writing", __func__);
2353 mdelay(5); 2353 mdelay(5);
2354 return(-1); 2354 return(-1);
2355 } 2355 }
@@ -2363,7 +2363,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2363 if (d_details->calculate_baud_rate 2363 if (d_details->calculate_baud_rate
2364 (p_priv->baud, d_details->baudclk, &msg.baudHi, 2364 (p_priv->baud, d_details->baudclk, &msg.baudHi,
2365 &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) { 2365 &msg.baudLo, &prescaler, 0) == KEYSPAN_INVALID_BAUD_RATE ) {
2366 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 2366 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
2367 p_priv->baud); 2367 p_priv->baud);
2368 p_priv->baud = 9600; 2368 p_priv->baud = 9600;
2369 d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk, 2369 d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk,
@@ -2453,7 +2453,7 @@ static int keyspan_usa90_send_setup(struct usb_serial *serial,
2453 2453
2454 this_urb->dev = serial->dev; 2454 this_urb->dev = serial->dev;
2455 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) { 2455 if ((err = usb_submit_urb(this_urb, GFP_ATOMIC)) != 0) {
2456 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, err); 2456 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__, err);
2457 } 2457 }
2458 return (0); 2458 return (0);
2459} 2459}
@@ -2469,7 +2469,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2469 struct urb *this_urb; 2469 struct urb *this_urb;
2470 int err, device_port; 2470 int err, device_port;
2471 2471
2472 dbg ("%s", __FUNCTION__); 2472 dbg ("%s", __func__);
2473 2473
2474 s_priv = usb_get_serial_data(serial); 2474 s_priv = usb_get_serial_data(serial);
2475 p_priv = usb_get_serial_port_data(port); 2475 p_priv = usb_get_serial_port_data(port);
@@ -2482,7 +2482,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2482 2482
2483 /* Make sure we have an urb then send the message */ 2483 /* Make sure we have an urb then send the message */
2484 if (this_urb == NULL) { 2484 if (this_urb == NULL) {
2485 dbg("%s - oops no urb for port %d.", __FUNCTION__, 2485 dbg("%s - oops no urb for port %d.", __func__,
2486 port->number); 2486 port->number);
2487 return -1; 2487 return -1;
2488 } 2488 }
@@ -2492,7 +2492,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2492 if ((reset_port + 1) > p_priv->resend_cont) 2492 if ((reset_port + 1) > p_priv->resend_cont)
2493 p_priv->resend_cont = reset_port + 1; 2493 p_priv->resend_cont = reset_port + 1;
2494 if (this_urb->status == -EINPROGRESS) { 2494 if (this_urb->status == -EINPROGRESS) {
2495 /* dbg ("%s - already writing", __FUNCTION__); */ 2495 /* dbg ("%s - already writing", __func__); */
2496 mdelay(5); 2496 mdelay(5);
2497 return(-1); 2497 return(-1);
2498 } 2498 }
@@ -2508,7 +2508,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2508 if (d_details->calculate_baud_rate 2508 if (d_details->calculate_baud_rate
2509 (p_priv->baud, d_details->baudclk, &msg.baudHi, 2509 (p_priv->baud, d_details->baudclk, &msg.baudHi,
2510 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) { 2510 &msg.baudLo, &msg.prescaler, device_port) == KEYSPAN_INVALID_BAUD_RATE ) {
2511 dbg("%s - Invalid baud rate %d requested, using 9600.", __FUNCTION__, 2511 dbg("%s - Invalid baud rate %d requested, using 9600.", __func__,
2512 p_priv->baud); 2512 p_priv->baud);
2513 msg.baudLo = 0; 2513 msg.baudLo = 0;
2514 msg.baudHi = 125; /* Values for 9600 baud */ 2514 msg.baudHi = 125; /* Values for 9600 baud */
@@ -2601,7 +2601,7 @@ static int keyspan_usa67_send_setup(struct usb_serial *serial,
2601 2601
2602 err = usb_submit_urb(this_urb, GFP_ATOMIC); 2602 err = usb_submit_urb(this_urb, GFP_ATOMIC);
2603 if (err != 0) 2603 if (err != 0)
2604 dbg("%s - usb_submit_urb(setup) failed (%d)", __FUNCTION__, 2604 dbg("%s - usb_submit_urb(setup) failed (%d)", __func__,
2605 err); 2605 err);
2606 return (0); 2606 return (0);
2607} 2607}
@@ -2612,7 +2612,7 @@ static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
2612 struct keyspan_serial_private *s_priv; 2612 struct keyspan_serial_private *s_priv;
2613 const struct keyspan_device_details *d_details; 2613 const struct keyspan_device_details *d_details;
2614 2614
2615 dbg ("%s", __FUNCTION__); 2615 dbg ("%s", __func__);
2616 2616
2617 s_priv = usb_get_serial_data(serial); 2617 s_priv = usb_get_serial_data(serial);
2618 d_details = s_priv->device_details; 2618 d_details = s_priv->device_details;
@@ -2647,20 +2647,20 @@ static int keyspan_startup (struct usb_serial *serial)
2647 struct keyspan_port_private *p_priv; 2647 struct keyspan_port_private *p_priv;
2648 const struct keyspan_device_details *d_details; 2648 const struct keyspan_device_details *d_details;
2649 2649
2650 dbg("%s", __FUNCTION__); 2650 dbg("%s", __func__);
2651 2651
2652 for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i) 2652 for (i = 0; (d_details = keyspan_devices[i]) != NULL; ++i)
2653 if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct)) 2653 if (d_details->product_id == le16_to_cpu(serial->dev->descriptor.idProduct))
2654 break; 2654 break;
2655 if (d_details == NULL) { 2655 if (d_details == NULL) {
2656 dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, le16_to_cpu(serial->dev->descriptor.idProduct)); 2656 dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __func__, le16_to_cpu(serial->dev->descriptor.idProduct));
2657 return 1; 2657 return 1;
2658 } 2658 }
2659 2659
2660 /* Setup private data for serial driver */ 2660 /* Setup private data for serial driver */
2661 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL); 2661 s_priv = kzalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL);
2662 if (!s_priv) { 2662 if (!s_priv) {
2663 dbg("%s - kmalloc for keyspan_serial_private failed.", __FUNCTION__); 2663 dbg("%s - kmalloc for keyspan_serial_private failed.", __func__);
2664 return -ENOMEM; 2664 return -ENOMEM;
2665 } 2665 }
2666 2666
@@ -2672,7 +2672,7 @@ static int keyspan_startup (struct usb_serial *serial)
2672 port = serial->port[i]; 2672 port = serial->port[i];
2673 p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL); 2673 p_priv = kzalloc(sizeof(struct keyspan_port_private), GFP_KERNEL);
2674 if (!p_priv) { 2674 if (!p_priv) {
2675 dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __FUNCTION__, i); 2675 dbg("%s - kmalloc for keyspan_port_private (%d) failed!.", __func__, i);
2676 return (1); 2676 return (1);
2677 } 2677 }
2678 p_priv->device_details = d_details; 2678 p_priv->device_details = d_details;
@@ -2685,14 +2685,14 @@ static int keyspan_startup (struct usb_serial *serial)
2685 s_priv->instat_urb->dev = serial->dev; 2685 s_priv->instat_urb->dev = serial->dev;
2686 err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL); 2686 err = usb_submit_urb(s_priv->instat_urb, GFP_KERNEL);
2687 if (err != 0) 2687 if (err != 0)
2688 dbg("%s - submit instat urb failed %d", __FUNCTION__, 2688 dbg("%s - submit instat urb failed %d", __func__,
2689 err); 2689 err);
2690 } 2690 }
2691 if (s_priv->indat_urb != NULL) { 2691 if (s_priv->indat_urb != NULL) {
2692 s_priv->indat_urb->dev = serial->dev; 2692 s_priv->indat_urb->dev = serial->dev;
2693 err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL); 2693 err = usb_submit_urb(s_priv->indat_urb, GFP_KERNEL);
2694 if (err != 0) 2694 if (err != 0)
2695 dbg("%s - submit indat urb failed %d", __FUNCTION__, 2695 dbg("%s - submit indat urb failed %d", __func__,
2696 err); 2696 err);
2697 } 2697 }
2698 2698
@@ -2706,7 +2706,7 @@ static void keyspan_shutdown (struct usb_serial *serial)
2706 struct keyspan_serial_private *s_priv; 2706 struct keyspan_serial_private *s_priv;
2707 struct keyspan_port_private *p_priv; 2707 struct keyspan_port_private *p_priv;
2708 2708
2709 dbg("%s", __FUNCTION__); 2709 dbg("%s", __func__);
2710 2710
2711 s_priv = usb_get_serial_data(serial); 2711 s_priv = usb_get_serial_data(serial);
2712 2712