diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-03-03 19:08:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-25 00:16:55 -0400 |
commit | 441b62c1edb986827154768d89bbac0ba779984f (patch) | |
tree | 13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/cypress_m8.c | |
parent | 14722ef4acedc643f0b78b7165ceff2d300dae4d (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/cypress_m8.c')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index d8304eaf34c4..01dfc0afc654 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -330,7 +330,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
330 | __u8 feature_buffer[5]; | 330 | __u8 feature_buffer[5]; |
331 | unsigned long flags; | 331 | unsigned long flags; |
332 | 332 | ||
333 | dbg("%s", __FUNCTION__); | 333 | dbg("%s", __func__); |
334 | 334 | ||
335 | priv = usb_get_serial_port_data(port); | 335 | priv = usb_get_serial_port_data(port); |
336 | 336 | ||
@@ -345,7 +345,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
345 | new_baudrate = priv->baud_rate; | 345 | new_baudrate = priv->baud_rate; |
346 | /* Change of speed ? */ | 346 | /* Change of speed ? */ |
347 | else if (baud_rate != priv->baud_rate) { | 347 | else if (baud_rate != priv->baud_rate) { |
348 | dbg("%s - baud rate is changing", __FUNCTION__); | 348 | dbg("%s - baud rate is changing", __func__); |
349 | retval = analyze_baud_rate(port, baud_rate); | 349 | retval = analyze_baud_rate(port, baud_rate); |
350 | if (retval >= 0) { | 350 | if (retval >= 0) { |
351 | new_baudrate = retval; | 351 | new_baudrate = retval; |
@@ -353,7 +353,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
353 | __func__, new_baudrate); | 353 | __func__, new_baudrate); |
354 | } | 354 | } |
355 | } | 355 | } |
356 | dbg("%s - baud rate is being sent as %d", __FUNCTION__, new_baudrate); | 356 | dbg("%s - baud rate is being sent as %d", __func__, new_baudrate); |
357 | 357 | ||
358 | memset(feature_buffer, 0, sizeof(feature_buffer)); | 358 | memset(feature_buffer, 0, sizeof(feature_buffer)); |
359 | /* fill the feature_buffer with new configuration */ | 359 | /* fill the feature_buffer with new configuration */ |
@@ -367,8 +367,8 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
367 | /* 1 bit gap */ | 367 | /* 1 bit gap */ |
368 | feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */ | 368 | feature_buffer[4] |= (reset << 7); /* assign reset at end of byte, 1 bit space */ |
369 | 369 | ||
370 | dbg("%s - device is being sent this feature report:", __FUNCTION__); | 370 | dbg("%s - device is being sent this feature report:", __func__); |
371 | dbg("%s - %02X - %02X - %02X - %02X - %02X", __FUNCTION__, feature_buffer[0], feature_buffer[1], | 371 | dbg("%s - %02X - %02X - %02X - %02X - %02X", __func__, feature_buffer[0], feature_buffer[1], |
372 | feature_buffer[2], feature_buffer[3], feature_buffer[4]); | 372 | feature_buffer[2], feature_buffer[3], feature_buffer[4]); |
373 | 373 | ||
374 | do { | 374 | do { |
@@ -386,7 +386,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
386 | retval != -ENODEV); | 386 | retval != -ENODEV); |
387 | 387 | ||
388 | if (retval != sizeof(feature_buffer)) { | 388 | if (retval != sizeof(feature_buffer)) { |
389 | err("%s - failed sending serial line settings - %d", __FUNCTION__, retval); | 389 | err("%s - failed sending serial line settings - %d", __func__, retval); |
390 | cypress_set_dead(port); | 390 | cypress_set_dead(port); |
391 | } else { | 391 | } else { |
392 | spin_lock_irqsave(&priv->lock, flags); | 392 | spin_lock_irqsave(&priv->lock, flags); |
@@ -406,7 +406,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
406 | to crash the hardware. */ | 406 | to crash the hardware. */ |
407 | return -ENOTTY; | 407 | return -ENOTTY; |
408 | } | 408 | } |
409 | dbg("%s - retreiving serial line settings", __FUNCTION__); | 409 | dbg("%s - retreiving serial line settings", __func__); |
410 | /* set initial values in feature buffer */ | 410 | /* set initial values in feature buffer */ |
411 | memset(feature_buffer, 0, sizeof(feature_buffer)); | 411 | memset(feature_buffer, 0, sizeof(feature_buffer)); |
412 | 412 | ||
@@ -425,7 +425,7 @@ static int cypress_serial_control (struct usb_serial_port *port, speed_t baud_ra | |||
425 | retval != -ENODEV); | 425 | retval != -ENODEV); |
426 | 426 | ||
427 | if (retval != sizeof(feature_buffer)) { | 427 | if (retval != sizeof(feature_buffer)) { |
428 | err("%s - failed to retrieve serial line settings - %d", __FUNCTION__, retval); | 428 | err("%s - failed to retrieve serial line settings - %d", __func__, retval); |
429 | cypress_set_dead(port); | 429 | cypress_set_dead(port); |
430 | return retval; | 430 | return retval; |
431 | } else { | 431 | } else { |
@@ -473,7 +473,7 @@ static int generic_startup (struct usb_serial *serial) | |||
473 | struct cypress_private *priv; | 473 | struct cypress_private *priv; |
474 | struct usb_serial_port *port = serial->port[0]; | 474 | struct usb_serial_port *port = serial->port[0]; |
475 | 475 | ||
476 | dbg("%s - port %d", __FUNCTION__, port->number); | 476 | dbg("%s - port %d", __func__, port->number); |
477 | 477 | ||
478 | priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL); | 478 | priv = kzalloc(sizeof (struct cypress_private), GFP_KERNEL); |
479 | if (!priv) | 479 | if (!priv) |
@@ -509,12 +509,12 @@ static int generic_startup (struct usb_serial *serial) | |||
509 | priv->write_urb_interval = interval; | 509 | priv->write_urb_interval = interval; |
510 | priv->read_urb_interval = interval; | 510 | priv->read_urb_interval = interval; |
511 | dbg("%s - port %d read & write intervals forced to %d", | 511 | dbg("%s - port %d read & write intervals forced to %d", |
512 | __FUNCTION__,port->number,interval); | 512 | __func__,port->number,interval); |
513 | } else { | 513 | } else { |
514 | priv->write_urb_interval = port->interrupt_out_urb->interval; | 514 | priv->write_urb_interval = port->interrupt_out_urb->interval; |
515 | priv->read_urb_interval = port->interrupt_in_urb->interval; | 515 | priv->read_urb_interval = port->interrupt_in_urb->interval; |
516 | dbg("%s - port %d intervals: read=%d write=%d", | 516 | dbg("%s - port %d intervals: read=%d write=%d", |
517 | __FUNCTION__,port->number, | 517 | __func__,port->number, |
518 | priv->read_urb_interval,priv->write_urb_interval); | 518 | priv->read_urb_interval,priv->write_urb_interval); |
519 | } | 519 | } |
520 | usb_set_serial_port_data(port, priv); | 520 | usb_set_serial_port_data(port, priv); |
@@ -528,10 +528,10 @@ static int cypress_earthmate_startup (struct usb_serial *serial) | |||
528 | struct cypress_private *priv; | 528 | struct cypress_private *priv; |
529 | struct usb_serial_port *port = serial->port[0]; | 529 | struct usb_serial_port *port = serial->port[0]; |
530 | 530 | ||
531 | dbg("%s", __FUNCTION__); | 531 | dbg("%s", __func__); |
532 | 532 | ||
533 | if (generic_startup(serial)) { | 533 | if (generic_startup(serial)) { |
534 | dbg("%s - Failed setting up port %d", __FUNCTION__, | 534 | dbg("%s - Failed setting up port %d", __func__, |
535 | port->number); | 535 | port->number); |
536 | return 1; | 536 | return 1; |
537 | } | 537 | } |
@@ -559,10 +559,10 @@ static int cypress_hidcom_startup (struct usb_serial *serial) | |||
559 | { | 559 | { |
560 | struct cypress_private *priv; | 560 | struct cypress_private *priv; |
561 | 561 | ||
562 | dbg("%s", __FUNCTION__); | 562 | dbg("%s", __func__); |
563 | 563 | ||
564 | if (generic_startup(serial)) { | 564 | if (generic_startup(serial)) { |
565 | dbg("%s - Failed setting up port %d", __FUNCTION__, | 565 | dbg("%s - Failed setting up port %d", __func__, |
566 | serial->port[0]->number); | 566 | serial->port[0]->number); |
567 | return 1; | 567 | return 1; |
568 | } | 568 | } |
@@ -578,10 +578,10 @@ static int cypress_ca42v2_startup (struct usb_serial *serial) | |||
578 | { | 578 | { |
579 | struct cypress_private *priv; | 579 | struct cypress_private *priv; |
580 | 580 | ||
581 | dbg("%s", __FUNCTION__); | 581 | dbg("%s", __func__); |
582 | 582 | ||
583 | if (generic_startup(serial)) { | 583 | if (generic_startup(serial)) { |
584 | dbg("%s - Failed setting up port %d", __FUNCTION__, | 584 | dbg("%s - Failed setting up port %d", __func__, |
585 | serial->port[0]->number); | 585 | serial->port[0]->number); |
586 | return 1; | 586 | return 1; |
587 | } | 587 | } |
@@ -597,7 +597,7 @@ static void cypress_shutdown (struct usb_serial *serial) | |||
597 | { | 597 | { |
598 | struct cypress_private *priv; | 598 | struct cypress_private *priv; |
599 | 599 | ||
600 | dbg ("%s - port %d", __FUNCTION__, serial->port[0]->number); | 600 | dbg ("%s - port %d", __func__, serial->port[0]->number); |
601 | 601 | ||
602 | /* all open ports are closed at this point */ | 602 | /* all open ports are closed at this point */ |
603 | 603 | ||
@@ -618,7 +618,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp) | |||
618 | unsigned long flags; | 618 | unsigned long flags; |
619 | int result = 0; | 619 | int result = 0; |
620 | 620 | ||
621 | dbg("%s - port %d", __FUNCTION__, port->number); | 621 | dbg("%s - port %d", __func__, port->number); |
622 | 622 | ||
623 | if (!priv->comm_is_ok) | 623 | if (!priv->comm_is_ok) |
624 | return -EIO; | 624 | return -EIO; |
@@ -646,16 +646,16 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp) | |||
646 | result = cypress_write(port, NULL, 0); | 646 | result = cypress_write(port, NULL, 0); |
647 | 647 | ||
648 | if (result) { | 648 | if (result) { |
649 | dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __FUNCTION__, result); | 649 | dev_err(&port->dev, "%s - failed setting the control lines - error %d\n", __func__, result); |
650 | return result; | 650 | return result; |
651 | } else | 651 | } else |
652 | dbg("%s - success setting the control lines", __FUNCTION__); | 652 | dbg("%s - success setting the control lines", __func__); |
653 | 653 | ||
654 | cypress_set_termios(port, &priv->tmp_termios); | 654 | cypress_set_termios(port, &priv->tmp_termios); |
655 | 655 | ||
656 | /* setup the port and start reading from the device */ | 656 | /* setup the port and start reading from the device */ |
657 | if(!port->interrupt_in_urb){ | 657 | if(!port->interrupt_in_urb){ |
658 | err("%s - interrupt_in_urb is empty!", __FUNCTION__); | 658 | err("%s - interrupt_in_urb is empty!", __func__); |
659 | return(-1); | 659 | return(-1); |
660 | } | 660 | } |
661 | 661 | ||
@@ -666,7 +666,7 @@ static int cypress_open (struct usb_serial_port *port, struct file *filp) | |||
666 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); | 666 | result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); |
667 | 667 | ||
668 | if (result){ | 668 | if (result){ |
669 | dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result); | 669 | dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __func__, result); |
670 | cypress_set_dead(port); | 670 | cypress_set_dead(port); |
671 | } | 671 | } |
672 | 672 | ||
@@ -682,7 +682,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp) | |||
682 | long timeout; | 682 | long timeout; |
683 | wait_queue_t wait; | 683 | wait_queue_t wait; |
684 | 684 | ||
685 | dbg("%s - port %d", __FUNCTION__, port->number); | 685 | dbg("%s - port %d", __func__, port->number); |
686 | 686 | ||
687 | /* wait for data to drain from buffer */ | 687 | /* wait for data to drain from buffer */ |
688 | spin_lock_irq(&priv->lock); | 688 | spin_lock_irq(&priv->lock); |
@@ -720,7 +720,7 @@ static void cypress_close(struct usb_serial_port *port, struct file * filp) | |||
720 | timeout = 2*HZ; | 720 | timeout = 2*HZ; |
721 | schedule_timeout_interruptible(timeout); | 721 | schedule_timeout_interruptible(timeout); |
722 | 722 | ||
723 | dbg("%s - stopping urbs", __FUNCTION__); | 723 | dbg("%s - stopping urbs", __func__); |
724 | usb_kill_urb (port->interrupt_in_urb); | 724 | usb_kill_urb (port->interrupt_in_urb); |
725 | usb_kill_urb (port->interrupt_out_urb); | 725 | usb_kill_urb (port->interrupt_out_urb); |
726 | 726 | ||
@@ -749,7 +749,7 @@ static int cypress_write(struct usb_serial_port *port, const unsigned char *buf, | |||
749 | struct cypress_private *priv = usb_get_serial_port_data(port); | 749 | struct cypress_private *priv = usb_get_serial_port_data(port); |
750 | unsigned long flags; | 750 | unsigned long flags; |
751 | 751 | ||
752 | dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count); | 752 | dbg("%s - port %d, %d bytes", __func__, port->number, count); |
753 | 753 | ||
754 | /* line control commands, which need to be executed immediately, | 754 | /* line control commands, which need to be executed immediately, |
755 | are not put into the buffer for obvious reasons. | 755 | are not put into the buffer for obvious reasons. |
@@ -782,12 +782,12 @@ static void cypress_send(struct usb_serial_port *port) | |||
782 | if (!priv->comm_is_ok) | 782 | if (!priv->comm_is_ok) |
783 | return; | 783 | return; |
784 | 784 | ||
785 | dbg("%s - port %d", __FUNCTION__, port->number); | 785 | dbg("%s - port %d", __func__, port->number); |
786 | dbg("%s - interrupt out size is %d", __FUNCTION__, port->interrupt_out_size); | 786 | dbg("%s - interrupt out size is %d", __func__, port->interrupt_out_size); |
787 | 787 | ||
788 | spin_lock_irqsave(&priv->lock, flags); | 788 | spin_lock_irqsave(&priv->lock, flags); |
789 | if (priv->write_urb_in_use) { | 789 | if (priv->write_urb_in_use) { |
790 | dbg("%s - can't write, urb in use", __FUNCTION__); | 790 | dbg("%s - can't write, urb in use", __func__); |
791 | spin_unlock_irqrestore(&priv->lock, flags); | 791 | spin_unlock_irqrestore(&priv->lock, flags); |
792 | return; | 792 | return; |
793 | } | 793 | } |
@@ -816,7 +816,7 @@ static void cypress_send(struct usb_serial_port *port) | |||
816 | 816 | ||
817 | if (priv->cmd_ctrl) { | 817 | if (priv->cmd_ctrl) { |
818 | priv->cmd_count++; | 818 | priv->cmd_count++; |
819 | dbg("%s - line control command being issued", __FUNCTION__); | 819 | dbg("%s - line control command being issued", __func__); |
820 | spin_unlock_irqrestore(&priv->lock, flags); | 820 | spin_unlock_irqrestore(&priv->lock, flags); |
821 | goto send; | 821 | goto send; |
822 | } else | 822 | } else |
@@ -838,7 +838,7 @@ static void cypress_send(struct usb_serial_port *port) | |||
838 | port->interrupt_out_buffer[0] |= count; | 838 | port->interrupt_out_buffer[0] |= count; |
839 | } | 839 | } |
840 | 840 | ||
841 | dbg("%s - count is %d", __FUNCTION__, count); | 841 | dbg("%s - count is %d", __func__, count); |
842 | 842 | ||
843 | send: | 843 | send: |
844 | spin_lock_irqsave(&priv->lock, flags); | 844 | spin_lock_irqsave(&priv->lock, flags); |
@@ -851,7 +851,7 @@ send: | |||
851 | actual_size = count + | 851 | actual_size = count + |
852 | (priv->pkt_fmt == packet_format_1 ? 2 : 1); | 852 | (priv->pkt_fmt == packet_format_1 ? 2 : 1); |
853 | 853 | ||
854 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, port->interrupt_out_size, | 854 | usb_serial_debug_data(debug, &port->dev, __func__, port->interrupt_out_size, |
855 | port->interrupt_out_urb->transfer_buffer); | 855 | port->interrupt_out_urb->transfer_buffer); |
856 | 856 | ||
857 | usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev, | 857 | usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev, |
@@ -860,7 +860,7 @@ send: | |||
860 | cypress_write_int_callback, port, priv->write_urb_interval); | 860 | cypress_write_int_callback, port, priv->write_urb_interval); |
861 | result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC); | 861 | result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC); |
862 | if (result) { | 862 | if (result) { |
863 | dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, | 863 | dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __func__, |
864 | result); | 864 | result); |
865 | priv->write_urb_in_use = 0; | 865 | priv->write_urb_in_use = 0; |
866 | cypress_set_dead(port); | 866 | cypress_set_dead(port); |
@@ -884,13 +884,13 @@ static int cypress_write_room(struct usb_serial_port *port) | |||
884 | int room = 0; | 884 | int room = 0; |
885 | unsigned long flags; | 885 | unsigned long flags; |
886 | 886 | ||
887 | dbg("%s - port %d", __FUNCTION__, port->number); | 887 | dbg("%s - port %d", __func__, port->number); |
888 | 888 | ||
889 | spin_lock_irqsave(&priv->lock, flags); | 889 | spin_lock_irqsave(&priv->lock, flags); |
890 | room = cypress_buf_space_avail(priv->buf); | 890 | room = cypress_buf_space_avail(priv->buf); |
891 | spin_unlock_irqrestore(&priv->lock, flags); | 891 | spin_unlock_irqrestore(&priv->lock, flags); |
892 | 892 | ||
893 | dbg("%s - returns %d", __FUNCTION__, room); | 893 | dbg("%s - returns %d", __func__, room); |
894 | return room; | 894 | return room; |
895 | } | 895 | } |
896 | 896 | ||
@@ -902,7 +902,7 @@ static int cypress_tiocmget (struct usb_serial_port *port, struct file *file) | |||
902 | unsigned int result = 0; | 902 | unsigned int result = 0; |
903 | unsigned long flags; | 903 | unsigned long flags; |
904 | 904 | ||
905 | dbg("%s - port %d", __FUNCTION__, port->number); | 905 | dbg("%s - port %d", __func__, port->number); |
906 | 906 | ||
907 | spin_lock_irqsave(&priv->lock, flags); | 907 | spin_lock_irqsave(&priv->lock, flags); |
908 | control = priv->line_control; | 908 | control = priv->line_control; |
@@ -916,7 +916,7 @@ static int cypress_tiocmget (struct usb_serial_port *port, struct file *file) | |||
916 | | ((status & UART_RI) ? TIOCM_RI : 0) | 916 | | ((status & UART_RI) ? TIOCM_RI : 0) |
917 | | ((status & UART_CD) ? TIOCM_CD : 0); | 917 | | ((status & UART_CD) ? TIOCM_CD : 0); |
918 | 918 | ||
919 | dbg("%s - result = %x", __FUNCTION__, result); | 919 | dbg("%s - result = %x", __func__, result); |
920 | 920 | ||
921 | return result; | 921 | return result; |
922 | } | 922 | } |
@@ -928,7 +928,7 @@ static int cypress_tiocmset (struct usb_serial_port *port, struct file *file, | |||
928 | struct cypress_private *priv = usb_get_serial_port_data(port); | 928 | struct cypress_private *priv = usb_get_serial_port_data(port); |
929 | unsigned long flags; | 929 | unsigned long flags; |
930 | 930 | ||
931 | dbg("%s - port %d", __FUNCTION__, port->number); | 931 | dbg("%s - port %d", __func__, port->number); |
932 | 932 | ||
933 | spin_lock_irqsave(&priv->lock, flags); | 933 | spin_lock_irqsave(&priv->lock, flags); |
934 | if (set & TIOCM_RTS) | 934 | if (set & TIOCM_RTS) |
@@ -950,7 +950,7 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi | |||
950 | { | 950 | { |
951 | struct cypress_private *priv = usb_get_serial_port_data(port); | 951 | struct cypress_private *priv = usb_get_serial_port_data(port); |
952 | 952 | ||
953 | dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); | 953 | dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd); |
954 | 954 | ||
955 | switch (cmd) { | 955 | switch (cmd) { |
956 | /* This code comes from drivers/char/serial.c and ftdi_sio.c */ | 956 | /* This code comes from drivers/char/serial.c and ftdi_sio.c */ |
@@ -988,7 +988,7 @@ static int cypress_ioctl (struct usb_serial_port *port, struct file * file, unsi | |||
988 | break; | 988 | break; |
989 | } | 989 | } |
990 | 990 | ||
991 | dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __FUNCTION__, cmd); | 991 | dbg("%s - arg not supported - it was 0x%04x - check include/asm/ioctls.h", __func__, cmd); |
992 | 992 | ||
993 | return -ENOIOCTLCMD; | 993 | return -ENOIOCTLCMD; |
994 | } /* cypress_ioctl */ | 994 | } /* cypress_ioctl */ |
@@ -1005,7 +1005,7 @@ static void cypress_set_termios (struct usb_serial_port *port, | |||
1005 | __u8 oldlines; | 1005 | __u8 oldlines; |
1006 | int linechange = 0; | 1006 | int linechange = 0; |
1007 | 1007 | ||
1008 | dbg("%s - port %d", __FUNCTION__, port->number); | 1008 | dbg("%s - port %d", __func__, port->number); |
1009 | 1009 | ||
1010 | tty = port->tty; | 1010 | tty = port->tty; |
1011 | 1011 | ||
@@ -1076,7 +1076,7 @@ static void cypress_set_termios (struct usb_serial_port *port, | |||
1076 | break; | 1076 | break; |
1077 | default: | 1077 | default: |
1078 | err("%s - CSIZE was set, but not CS5-CS8", | 1078 | err("%s - CSIZE was set, but not CS5-CS8", |
1079 | __FUNCTION__); | 1079 | __func__); |
1080 | data_bits = 3; | 1080 | data_bits = 3; |
1081 | } | 1081 | } |
1082 | } else | 1082 | } else |
@@ -1086,14 +1086,14 @@ static void cypress_set_termios (struct usb_serial_port *port, | |||
1086 | oldlines = priv->line_control; | 1086 | oldlines = priv->line_control; |
1087 | if ((cflag & CBAUD) == B0) { | 1087 | if ((cflag & CBAUD) == B0) { |
1088 | /* drop dtr and rts */ | 1088 | /* drop dtr and rts */ |
1089 | dbg("%s - dropping the lines, baud rate 0bps", __FUNCTION__); | 1089 | dbg("%s - dropping the lines, baud rate 0bps", __func__); |
1090 | priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); | 1090 | priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS); |
1091 | } else | 1091 | } else |
1092 | priv->line_control = (CONTROL_DTR | CONTROL_RTS); | 1092 | priv->line_control = (CONTROL_DTR | CONTROL_RTS); |
1093 | spin_unlock_irqrestore(&priv->lock, flags); | 1093 | spin_unlock_irqrestore(&priv->lock, flags); |
1094 | 1094 | ||
1095 | dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, " | 1095 | dbg("%s - sending %d stop_bits, %d parity_enable, %d parity_type, " |
1096 | "%d data_bits (+5)", __FUNCTION__, stop_bits, | 1096 | "%d data_bits (+5)", __func__, stop_bits, |
1097 | parity_enable, parity_type, data_bits); | 1097 | parity_enable, parity_type, data_bits); |
1098 | 1098 | ||
1099 | cypress_serial_control(port, tty_get_baud_rate(tty), data_bits, stop_bits, | 1099 | cypress_serial_control(port, tty_get_baud_rate(tty), data_bits, stop_bits, |
@@ -1154,13 +1154,13 @@ static int cypress_chars_in_buffer(struct usb_serial_port *port) | |||
1154 | int chars = 0; | 1154 | int chars = 0; |
1155 | unsigned long flags; | 1155 | unsigned long flags; |
1156 | 1156 | ||
1157 | dbg("%s - port %d", __FUNCTION__, port->number); | 1157 | dbg("%s - port %d", __func__, port->number); |
1158 | 1158 | ||
1159 | spin_lock_irqsave(&priv->lock, flags); | 1159 | spin_lock_irqsave(&priv->lock, flags); |
1160 | chars = cypress_buf_data_avail(priv->buf); | 1160 | chars = cypress_buf_data_avail(priv->buf); |
1161 | spin_unlock_irqrestore(&priv->lock, flags); | 1161 | spin_unlock_irqrestore(&priv->lock, flags); |
1162 | 1162 | ||
1163 | dbg("%s - returns %d", __FUNCTION__, chars); | 1163 | dbg("%s - returns %d", __func__, chars); |
1164 | return chars; | 1164 | return chars; |
1165 | } | 1165 | } |
1166 | 1166 | ||
@@ -1170,7 +1170,7 @@ static void cypress_throttle (struct usb_serial_port *port) | |||
1170 | struct cypress_private *priv = usb_get_serial_port_data(port); | 1170 | struct cypress_private *priv = usb_get_serial_port_data(port); |
1171 | unsigned long flags; | 1171 | unsigned long flags; |
1172 | 1172 | ||
1173 | dbg("%s - port %d", __FUNCTION__, port->number); | 1173 | dbg("%s - port %d", __func__, port->number); |
1174 | 1174 | ||
1175 | spin_lock_irqsave(&priv->lock, flags); | 1175 | spin_lock_irqsave(&priv->lock, flags); |
1176 | priv->rx_flags = THROTTLED; | 1176 | priv->rx_flags = THROTTLED; |
@@ -1184,7 +1184,7 @@ static void cypress_unthrottle (struct usb_serial_port *port) | |||
1184 | int actually_throttled, result; | 1184 | int actually_throttled, result; |
1185 | unsigned long flags; | 1185 | unsigned long flags; |
1186 | 1186 | ||
1187 | dbg("%s - port %d", __FUNCTION__, port->number); | 1187 | dbg("%s - port %d", __func__, port->number); |
1188 | 1188 | ||
1189 | spin_lock_irqsave(&priv->lock, flags); | 1189 | spin_lock_irqsave(&priv->lock, flags); |
1190 | actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; | 1190 | actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; |
@@ -1200,7 +1200,7 @@ static void cypress_unthrottle (struct usb_serial_port *port) | |||
1200 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 1200 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
1201 | if (result) { | 1201 | if (result) { |
1202 | dev_err(&port->dev, "%s - failed submitting read urb, " | 1202 | dev_err(&port->dev, "%s - failed submitting read urb, " |
1203 | "error %d\n", __FUNCTION__, result); | 1203 | "error %d\n", __func__, result); |
1204 | cypress_set_dead(port); | 1204 | cypress_set_dead(port); |
1205 | } | 1205 | } |
1206 | } | 1206 | } |
@@ -1221,7 +1221,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1221 | int i = 0; | 1221 | int i = 0; |
1222 | int status = urb->status; | 1222 | int status = urb->status; |
1223 | 1223 | ||
1224 | dbg("%s - port %d", __FUNCTION__, port->number); | 1224 | dbg("%s - port %d", __func__, port->number); |
1225 | 1225 | ||
1226 | switch (status) { | 1226 | switch (status) { |
1227 | case 0: /* success */ | 1227 | case 0: /* success */ |
@@ -1237,14 +1237,14 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1237 | default: | 1237 | default: |
1238 | /* something ugly is going on... */ | 1238 | /* something ugly is going on... */ |
1239 | dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n", | 1239 | dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n", |
1240 | __FUNCTION__, status); | 1240 | __func__, status); |
1241 | cypress_set_dead(port); | 1241 | cypress_set_dead(port); |
1242 | return; | 1242 | return; |
1243 | } | 1243 | } |
1244 | 1244 | ||
1245 | spin_lock_irqsave(&priv->lock, flags); | 1245 | spin_lock_irqsave(&priv->lock, flags); |
1246 | if (priv->rx_flags & THROTTLED) { | 1246 | if (priv->rx_flags & THROTTLED) { |
1247 | dbg("%s - now throttling", __FUNCTION__); | 1247 | dbg("%s - now throttling", __func__); |
1248 | priv->rx_flags |= ACTUALLY_THROTTLED; | 1248 | priv->rx_flags |= ACTUALLY_THROTTLED; |
1249 | spin_unlock_irqrestore(&priv->lock, flags); | 1249 | spin_unlock_irqrestore(&priv->lock, flags); |
1250 | return; | 1250 | return; |
@@ -1253,7 +1253,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1253 | 1253 | ||
1254 | tty = port->tty; | 1254 | tty = port->tty; |
1255 | if (!tty) { | 1255 | if (!tty) { |
1256 | dbg("%s - bad tty pointer - exiting", __FUNCTION__); | 1256 | dbg("%s - bad tty pointer - exiting", __func__); |
1257 | return; | 1257 | return; |
1258 | } | 1258 | } |
1259 | 1259 | ||
@@ -1285,7 +1285,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1285 | goto continue_read; | 1285 | goto continue_read; |
1286 | } | 1286 | } |
1287 | 1287 | ||
1288 | usb_serial_debug_data (debug, &port->dev, __FUNCTION__, | 1288 | usb_serial_debug_data (debug, &port->dev, __func__, |
1289 | urb->actual_length, data); | 1289 | urb->actual_length, data); |
1290 | 1290 | ||
1291 | spin_lock_irqsave(&priv->lock, flags); | 1291 | spin_lock_irqsave(&priv->lock, flags); |
@@ -1302,7 +1302,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1302 | * though */ | 1302 | * though */ |
1303 | if (tty && !(tty->termios->c_cflag & CLOCAL) && | 1303 | if (tty && !(tty->termios->c_cflag & CLOCAL) && |
1304 | !(priv->current_status & UART_CD)) { | 1304 | !(priv->current_status & UART_CD)) { |
1305 | dbg("%s - calling hangup", __FUNCTION__); | 1305 | dbg("%s - calling hangup", __func__); |
1306 | tty_hangup(tty); | 1306 | tty_hangup(tty); |
1307 | goto continue_read; | 1307 | goto continue_read; |
1308 | } | 1308 | } |
@@ -1315,7 +1315,7 @@ static void cypress_read_int_callback(struct urb *urb) | |||
1315 | if (priv->current_status & CYP_ERROR) { | 1315 | if (priv->current_status & CYP_ERROR) { |
1316 | spin_unlock_irqrestore(&priv->lock, flags); | 1316 | spin_unlock_irqrestore(&priv->lock, flags); |
1317 | tty_flag = TTY_PARITY; | 1317 | tty_flag = TTY_PARITY; |
1318 | dbg("%s - Parity Error detected", __FUNCTION__); | 1318 | dbg("%s - Parity Error detected", __func__); |
1319 | } else | 1319 | } else |
1320 | spin_unlock_irqrestore(&priv->lock, flags); | 1320 | spin_unlock_irqrestore(&priv->lock, flags); |
1321 | 1321 | ||
@@ -1349,7 +1349,7 @@ continue_read: | |||
1349 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); | 1349 | result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); |
1350 | if (result) { | 1350 | if (result) { |
1351 | dev_err(&urb->dev->dev, "%s - failed resubmitting " | 1351 | dev_err(&urb->dev->dev, "%s - failed resubmitting " |
1352 | "read urb, error %d\n", __FUNCTION__, | 1352 | "read urb, error %d\n", __func__, |
1353 | result); | 1353 | result); |
1354 | cypress_set_dead(port); | 1354 | cypress_set_dead(port); |
1355 | } | 1355 | } |
@@ -1366,7 +1366,7 @@ static void cypress_write_int_callback(struct urb *urb) | |||
1366 | int result; | 1366 | int result; |
1367 | int status = urb->status; | 1367 | int status = urb->status; |
1368 | 1368 | ||
1369 | dbg("%s - port %d", __FUNCTION__, port->number); | 1369 | dbg("%s - port %d", __func__, port->number); |
1370 | 1370 | ||
1371 | switch (status) { | 1371 | switch (status) { |
1372 | case 0: | 1372 | case 0: |
@@ -1377,7 +1377,7 @@ static void cypress_write_int_callback(struct urb *urb) | |||
1377 | case -ESHUTDOWN: | 1377 | case -ESHUTDOWN: |
1378 | /* this urb is terminated, clean up */ | 1378 | /* this urb is terminated, clean up */ |
1379 | dbg("%s - urb shutting down with status: %d", | 1379 | dbg("%s - urb shutting down with status: %d", |
1380 | __FUNCTION__, status); | 1380 | __func__, status); |
1381 | priv->write_urb_in_use = 0; | 1381 | priv->write_urb_in_use = 0; |
1382 | return; | 1382 | return; |
1383 | case -EPIPE: /* no break needed; clear halt and resubmit */ | 1383 | case -EPIPE: /* no break needed; clear halt and resubmit */ |
@@ -1386,19 +1386,19 @@ static void cypress_write_int_callback(struct urb *urb) | |||
1386 | usb_clear_halt(port->serial->dev, 0x02); | 1386 | usb_clear_halt(port->serial->dev, 0x02); |
1387 | /* error in the urb, so we have to resubmit it */ | 1387 | /* error in the urb, so we have to resubmit it */ |
1388 | dbg("%s - nonzero write bulk status received: %d", | 1388 | dbg("%s - nonzero write bulk status received: %d", |
1389 | __FUNCTION__, status); | 1389 | __func__, status); |
1390 | port->interrupt_out_urb->transfer_buffer_length = 1; | 1390 | port->interrupt_out_urb->transfer_buffer_length = 1; |
1391 | port->interrupt_out_urb->dev = port->serial->dev; | 1391 | port->interrupt_out_urb->dev = port->serial->dev; |
1392 | result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC); | 1392 | result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC); |
1393 | if (!result) | 1393 | if (!result) |
1394 | return; | 1394 | return; |
1395 | dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", | 1395 | dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", |
1396 | __FUNCTION__, result); | 1396 | __func__, result); |
1397 | cypress_set_dead(port); | 1397 | cypress_set_dead(port); |
1398 | break; | 1398 | break; |
1399 | default: | 1399 | default: |
1400 | dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n", | 1400 | dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n", |
1401 | __FUNCTION__, status); | 1401 | __func__, status); |
1402 | cypress_set_dead(port); | 1402 | cypress_set_dead(port); |
1403 | break; | 1403 | break; |
1404 | } | 1404 | } |
@@ -1603,7 +1603,7 @@ static int __init cypress_init(void) | |||
1603 | { | 1603 | { |
1604 | int retval; | 1604 | int retval; |
1605 | 1605 | ||
1606 | dbg("%s", __FUNCTION__); | 1606 | dbg("%s", __func__); |
1607 | 1607 | ||
1608 | retval = usb_serial_register(&cypress_earthmate_device); | 1608 | retval = usb_serial_register(&cypress_earthmate_device); |
1609 | if (retval) | 1609 | if (retval) |
@@ -1634,7 +1634,7 @@ failed_em_register: | |||
1634 | 1634 | ||
1635 | static void __exit cypress_exit (void) | 1635 | static void __exit cypress_exit (void) |
1636 | { | 1636 | { |
1637 | dbg("%s", __FUNCTION__); | 1637 | dbg("%s", __func__); |
1638 | 1638 | ||
1639 | usb_deregister (&cypress_driver); | 1639 | usb_deregister (&cypress_driver); |
1640 | usb_serial_deregister (&cypress_earthmate_device); | 1640 | usb_serial_deregister (&cypress_earthmate_device); |