diff options
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r-- | drivers/usb/serial/whiteheat.c | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index c5af57be62f4..fb02424de4a0 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c | |||
@@ -282,7 +282,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct | |||
282 | int response; | 282 | int response; |
283 | const struct whiteheat_hex_record *record; | 283 | const struct whiteheat_hex_record *record; |
284 | 284 | ||
285 | dbg("%s", __FUNCTION__); | 285 | dbg("%s", __func__); |
286 | 286 | ||
287 | response = ezusb_set_reset (serial, 1); | 287 | response = ezusb_set_reset (serial, 1); |
288 | 288 | ||
@@ -292,7 +292,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct | |||
292 | (unsigned char *)record->data, record->data_size, 0xa0); | 292 | (unsigned char *)record->data, record->data_size, 0xa0); |
293 | if (response < 0) { | 293 | if (response < 0) { |
294 | err("%s - ezusb_writememory failed for loader (%d %04X %p %d)", | 294 | err("%s - ezusb_writememory failed for loader (%d %04X %p %d)", |
295 | __FUNCTION__, response, record->address, record->data, record->data_size); | 295 | __func__, response, record->address, record->data, record->data_size); |
296 | break; | 296 | break; |
297 | } | 297 | } |
298 | ++record; | 298 | ++record; |
@@ -309,7 +309,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct | |||
309 | (unsigned char *)record->data, record->data_size, 0xa3); | 309 | (unsigned char *)record->data, record->data_size, 0xa3); |
310 | if (response < 0) { | 310 | if (response < 0) { |
311 | err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", | 311 | err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", |
312 | __FUNCTION__, response, record->address, record->data, record->data_size); | 312 | __func__, response, record->address, record->data, record->data_size); |
313 | break; | 313 | break; |
314 | } | 314 | } |
315 | ++record; | 315 | ++record; |
@@ -323,7 +323,7 @@ static int whiteheat_firmware_download (struct usb_serial *serial, const struct | |||
323 | (unsigned char *)record->data, record->data_size, 0xa0); | 323 | (unsigned char *)record->data, record->data_size, 0xa0); |
324 | if (response < 0) { | 324 | if (response < 0) { |
325 | err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", | 325 | err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", |
326 | __FUNCTION__, response, record->address, record->data, record->data_size); | 326 | __func__, response, record->address, record->data, record->data_size); |
327 | break; | 327 | break; |
328 | } | 328 | } |
329 | ++record; | 329 | ++record; |
@@ -561,7 +561,7 @@ static void whiteheat_shutdown (struct usb_serial *serial) | |||
561 | struct list_head *tmp2; | 561 | struct list_head *tmp2; |
562 | int i; | 562 | int i; |
563 | 563 | ||
564 | dbg("%s", __FUNCTION__); | 564 | dbg("%s", __func__); |
565 | 565 | ||
566 | /* free up our private data for our command port */ | 566 | /* free up our private data for our command port */ |
567 | command_port = serial->port[COMMAND_PORT]; | 567 | command_port = serial->port[COMMAND_PORT]; |
@@ -598,7 +598,7 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp) | |||
598 | int retval = 0; | 598 | int retval = 0; |
599 | struct ktermios old_term; | 599 | struct ktermios old_term; |
600 | 600 | ||
601 | dbg("%s - port %d", __FUNCTION__, port->number); | 601 | dbg("%s - port %d", __func__, port->number); |
602 | 602 | ||
603 | retval = start_command_port(port->serial); | 603 | retval = start_command_port(port->serial); |
604 | if (retval) | 604 | if (retval) |
@@ -631,14 +631,14 @@ static int whiteheat_open (struct usb_serial_port *port, struct file *filp) | |||
631 | /* Start reading from the device */ | 631 | /* Start reading from the device */ |
632 | retval = start_port_read(port); | 632 | retval = start_port_read(port); |
633 | if (retval) { | 633 | if (retval) { |
634 | err("%s - failed submitting read urb, error %d", __FUNCTION__, retval); | 634 | err("%s - failed submitting read urb, error %d", __func__, retval); |
635 | firm_close(port); | 635 | firm_close(port); |
636 | stop_command_port(port->serial); | 636 | stop_command_port(port->serial); |
637 | goto exit; | 637 | goto exit; |
638 | } | 638 | } |
639 | 639 | ||
640 | exit: | 640 | exit: |
641 | dbg("%s - exit, retval = %d", __FUNCTION__, retval); | 641 | dbg("%s - exit, retval = %d", __func__, retval); |
642 | return retval; | 642 | return retval; |
643 | } | 643 | } |
644 | 644 | ||
@@ -651,7 +651,7 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp) | |||
651 | struct list_head *tmp; | 651 | struct list_head *tmp; |
652 | struct list_head *tmp2; | 652 | struct list_head *tmp2; |
653 | 653 | ||
654 | dbg("%s - port %d", __FUNCTION__, port->number); | 654 | dbg("%s - port %d", __func__, port->number); |
655 | 655 | ||
656 | mutex_lock(&port->serial->disc_mutex); | 656 | mutex_lock(&port->serial->disc_mutex); |
657 | /* filp is NULL when called from usb_serial_disconnect */ | 657 | /* filp is NULL when called from usb_serial_disconnect */ |
@@ -726,10 +726,10 @@ static int whiteheat_write(struct usb_serial_port *port, const unsigned char *bu | |||
726 | unsigned long flags; | 726 | unsigned long flags; |
727 | struct list_head *tmp; | 727 | struct list_head *tmp; |
728 | 728 | ||
729 | dbg("%s - port %d", __FUNCTION__, port->number); | 729 | dbg("%s - port %d", __func__, port->number); |
730 | 730 | ||
731 | if (count == 0) { | 731 | if (count == 0) { |
732 | dbg("%s - write request of 0 bytes", __FUNCTION__); | 732 | dbg("%s - write request of 0 bytes", __func__); |
733 | return (0); | 733 | return (0); |
734 | } | 734 | } |
735 | 735 | ||
@@ -748,13 +748,13 @@ static int whiteheat_write(struct usb_serial_port *port, const unsigned char *bu | |||
748 | bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count; | 748 | bytes = (count > port->bulk_out_size) ? port->bulk_out_size : count; |
749 | memcpy (urb->transfer_buffer, buf + sent, bytes); | 749 | memcpy (urb->transfer_buffer, buf + sent, bytes); |
750 | 750 | ||
751 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, bytes, urb->transfer_buffer); | 751 | usb_serial_debug_data(debug, &port->dev, __func__, bytes, urb->transfer_buffer); |
752 | 752 | ||
753 | urb->dev = serial->dev; | 753 | urb->dev = serial->dev; |
754 | urb->transfer_buffer_length = bytes; | 754 | urb->transfer_buffer_length = bytes; |
755 | result = usb_submit_urb(urb, GFP_ATOMIC); | 755 | result = usb_submit_urb(urb, GFP_ATOMIC); |
756 | if (result) { | 756 | if (result) { |
757 | err("%s - failed submitting write urb, error %d", __FUNCTION__, result); | 757 | err("%s - failed submitting write urb, error %d", __func__, result); |
758 | sent = result; | 758 | sent = result; |
759 | spin_lock_irqsave(&info->lock, flags); | 759 | spin_lock_irqsave(&info->lock, flags); |
760 | list_add(tmp, &info->tx_urbs_free); | 760 | list_add(tmp, &info->tx_urbs_free); |
@@ -780,7 +780,7 @@ static int whiteheat_write_room(struct usb_serial_port *port) | |||
780 | int room = 0; | 780 | int room = 0; |
781 | unsigned long flags; | 781 | unsigned long flags; |
782 | 782 | ||
783 | dbg("%s - port %d", __FUNCTION__, port->number); | 783 | dbg("%s - port %d", __func__, port->number); |
784 | 784 | ||
785 | spin_lock_irqsave(&info->lock, flags); | 785 | spin_lock_irqsave(&info->lock, flags); |
786 | list_for_each(tmp, &info->tx_urbs_free) | 786 | list_for_each(tmp, &info->tx_urbs_free) |
@@ -788,7 +788,7 @@ static int whiteheat_write_room(struct usb_serial_port *port) | |||
788 | spin_unlock_irqrestore(&info->lock, flags); | 788 | spin_unlock_irqrestore(&info->lock, flags); |
789 | room *= port->bulk_out_size; | 789 | room *= port->bulk_out_size; |
790 | 790 | ||
791 | dbg("%s - returns %d", __FUNCTION__, room); | 791 | dbg("%s - returns %d", __func__, room); |
792 | return (room); | 792 | return (room); |
793 | } | 793 | } |
794 | 794 | ||
@@ -798,7 +798,7 @@ static int whiteheat_tiocmget (struct usb_serial_port *port, struct file *file) | |||
798 | struct whiteheat_private *info = usb_get_serial_port_data(port); | 798 | struct whiteheat_private *info = usb_get_serial_port_data(port); |
799 | unsigned int modem_signals = 0; | 799 | unsigned int modem_signals = 0; |
800 | 800 | ||
801 | dbg("%s - port %d", __FUNCTION__, port->number); | 801 | dbg("%s - port %d", __func__, port->number); |
802 | 802 | ||
803 | firm_get_dtr_rts(port); | 803 | firm_get_dtr_rts(port); |
804 | if (info->mcr & UART_MCR_DTR) | 804 | if (info->mcr & UART_MCR_DTR) |
@@ -815,7 +815,7 @@ static int whiteheat_tiocmset (struct usb_serial_port *port, struct file *file, | |||
815 | { | 815 | { |
816 | struct whiteheat_private *info = usb_get_serial_port_data(port); | 816 | struct whiteheat_private *info = usb_get_serial_port_data(port); |
817 | 817 | ||
818 | dbg("%s - port %d", __FUNCTION__, port->number); | 818 | dbg("%s - port %d", __func__, port->number); |
819 | 819 | ||
820 | if (set & TIOCM_RTS) | 820 | if (set & TIOCM_RTS) |
821 | info->mcr |= UART_MCR_RTS; | 821 | info->mcr |= UART_MCR_RTS; |
@@ -838,7 +838,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un | |||
838 | struct serial_struct serstruct; | 838 | struct serial_struct serstruct; |
839 | void __user *user_arg = (void __user *)arg; | 839 | void __user *user_arg = (void __user *)arg; |
840 | 840 | ||
841 | dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); | 841 | dbg("%s - port %d, cmd 0x%.4x", __func__, port->number, cmd); |
842 | 842 | ||
843 | switch (cmd) { | 843 | switch (cmd) { |
844 | case TIOCGSERIAL: | 844 | case TIOCGSERIAL: |
@@ -880,7 +880,7 @@ static int whiteheat_ioctl (struct usb_serial_port *port, struct file * file, un | |||
880 | 880 | ||
881 | static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios) | 881 | static void whiteheat_set_termios(struct usb_serial_port *port, struct ktermios *old_termios) |
882 | { | 882 | { |
883 | dbg("%s -port %d", __FUNCTION__, port->number); | 883 | dbg("%s -port %d", __func__, port->number); |
884 | firm_setup_port(port); | 884 | firm_setup_port(port); |
885 | } | 885 | } |
886 | 886 | ||
@@ -898,7 +898,7 @@ static int whiteheat_chars_in_buffer(struct usb_serial_port *port) | |||
898 | int chars = 0; | 898 | int chars = 0; |
899 | unsigned long flags; | 899 | unsigned long flags; |
900 | 900 | ||
901 | dbg("%s - port %d", __FUNCTION__, port->number); | 901 | dbg("%s - port %d", __func__, port->number); |
902 | 902 | ||
903 | spin_lock_irqsave(&info->lock, flags); | 903 | spin_lock_irqsave(&info->lock, flags); |
904 | list_for_each(tmp, &info->tx_urbs_submitted) { | 904 | list_for_each(tmp, &info->tx_urbs_submitted) { |
@@ -907,7 +907,7 @@ static int whiteheat_chars_in_buffer(struct usb_serial_port *port) | |||
907 | } | 907 | } |
908 | spin_unlock_irqrestore(&info->lock, flags); | 908 | spin_unlock_irqrestore(&info->lock, flags); |
909 | 909 | ||
910 | dbg ("%s - returns %d", __FUNCTION__, chars); | 910 | dbg ("%s - returns %d", __func__, chars); |
911 | return chars; | 911 | return chars; |
912 | } | 912 | } |
913 | 913 | ||
@@ -917,7 +917,7 @@ static void whiteheat_throttle (struct usb_serial_port *port) | |||
917 | struct whiteheat_private *info = usb_get_serial_port_data(port); | 917 | struct whiteheat_private *info = usb_get_serial_port_data(port); |
918 | unsigned long flags; | 918 | unsigned long flags; |
919 | 919 | ||
920 | dbg("%s - port %d", __FUNCTION__, port->number); | 920 | dbg("%s - port %d", __func__, port->number); |
921 | 921 | ||
922 | spin_lock_irqsave(&info->lock, flags); | 922 | spin_lock_irqsave(&info->lock, flags); |
923 | info->flags |= THROTTLED; | 923 | info->flags |= THROTTLED; |
@@ -933,7 +933,7 @@ static void whiteheat_unthrottle (struct usb_serial_port *port) | |||
933 | int actually_throttled; | 933 | int actually_throttled; |
934 | unsigned long flags; | 934 | unsigned long flags; |
935 | 935 | ||
936 | dbg("%s - port %d", __FUNCTION__, port->number); | 936 | dbg("%s - port %d", __func__, port->number); |
937 | 937 | ||
938 | spin_lock_irqsave(&info->lock, flags); | 938 | spin_lock_irqsave(&info->lock, flags); |
939 | actually_throttled = info->flags & ACTUALLY_THROTTLED; | 939 | actually_throttled = info->flags & ACTUALLY_THROTTLED; |
@@ -954,7 +954,7 @@ static void command_port_write_callback(struct urb *urb) | |||
954 | { | 954 | { |
955 | int status = urb->status; | 955 | int status = urb->status; |
956 | 956 | ||
957 | dbg("%s", __FUNCTION__); | 957 | dbg("%s", __func__); |
958 | 958 | ||
959 | if (status) { | 959 | if (status) { |
960 | dbg("nonzero urb status: %d", status); | 960 | dbg("nonzero urb status: %d", status); |
@@ -971,22 +971,22 @@ static void command_port_read_callback(struct urb *urb) | |||
971 | unsigned char *data = urb->transfer_buffer; | 971 | unsigned char *data = urb->transfer_buffer; |
972 | int result; | 972 | int result; |
973 | 973 | ||
974 | dbg("%s", __FUNCTION__); | 974 | dbg("%s", __func__); |
975 | 975 | ||
976 | command_info = usb_get_serial_port_data(command_port); | 976 | command_info = usb_get_serial_port_data(command_port); |
977 | if (!command_info) { | 977 | if (!command_info) { |
978 | dbg ("%s - command_info is NULL, exiting.", __FUNCTION__); | 978 | dbg ("%s - command_info is NULL, exiting.", __func__); |
979 | return; | 979 | return; |
980 | } | 980 | } |
981 | if (status) { | 981 | if (status) { |
982 | dbg("%s - nonzero urb status: %d", __FUNCTION__, status); | 982 | dbg("%s - nonzero urb status: %d", __func__, status); |
983 | if (status != -ENOENT) | 983 | if (status != -ENOENT) |
984 | command_info->command_finished = WHITEHEAT_CMD_FAILURE; | 984 | command_info->command_finished = WHITEHEAT_CMD_FAILURE; |
985 | wake_up(&command_info->wait_command); | 985 | wake_up(&command_info->wait_command); |
986 | return; | 986 | return; |
987 | } | 987 | } |
988 | 988 | ||
989 | usb_serial_debug_data(debug, &command_port->dev, __FUNCTION__, urb->actual_length, data); | 989 | usb_serial_debug_data(debug, &command_port->dev, __func__, urb->actual_length, data); |
990 | 990 | ||
991 | if (data[0] == WHITEHEAT_CMD_COMPLETE) { | 991 | if (data[0] == WHITEHEAT_CMD_COMPLETE) { |
992 | command_info->command_finished = WHITEHEAT_CMD_COMPLETE; | 992 | command_info->command_finished = WHITEHEAT_CMD_COMPLETE; |
@@ -996,20 +996,20 @@ static void command_port_read_callback(struct urb *urb) | |||
996 | wake_up(&command_info->wait_command); | 996 | wake_up(&command_info->wait_command); |
997 | } else if (data[0] == WHITEHEAT_EVENT) { | 997 | } else if (data[0] == WHITEHEAT_EVENT) { |
998 | /* These are unsolicited reports from the firmware, hence no waiting command to wakeup */ | 998 | /* These are unsolicited reports from the firmware, hence no waiting command to wakeup */ |
999 | dbg("%s - event received", __FUNCTION__); | 999 | dbg("%s - event received", __func__); |
1000 | } else if (data[0] == WHITEHEAT_GET_DTR_RTS) { | 1000 | } else if (data[0] == WHITEHEAT_GET_DTR_RTS) { |
1001 | memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1); | 1001 | memcpy(command_info->result_buffer, &data[1], urb->actual_length - 1); |
1002 | command_info->command_finished = WHITEHEAT_CMD_COMPLETE; | 1002 | command_info->command_finished = WHITEHEAT_CMD_COMPLETE; |
1003 | wake_up(&command_info->wait_command); | 1003 | wake_up(&command_info->wait_command); |
1004 | } else { | 1004 | } else { |
1005 | dbg("%s - bad reply from firmware", __FUNCTION__); | 1005 | dbg("%s - bad reply from firmware", __func__); |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | /* Continue trying to always read */ | 1008 | /* Continue trying to always read */ |
1009 | command_port->read_urb->dev = command_port->serial->dev; | 1009 | command_port->read_urb->dev = command_port->serial->dev; |
1010 | result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC); | 1010 | result = usb_submit_urb(command_port->read_urb, GFP_ATOMIC); |
1011 | if (result) | 1011 | if (result) |
1012 | dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); | 1012 | dbg("%s - failed resubmitting read urb, error %d", __func__, result); |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | 1015 | ||
@@ -1021,13 +1021,13 @@ static void whiteheat_read_callback(struct urb *urb) | |||
1021 | struct whiteheat_private *info = usb_get_serial_port_data(port); | 1021 | struct whiteheat_private *info = usb_get_serial_port_data(port); |
1022 | int status = urb->status; | 1022 | int status = urb->status; |
1023 | 1023 | ||
1024 | dbg("%s - port %d", __FUNCTION__, port->number); | 1024 | dbg("%s - port %d", __func__, port->number); |
1025 | 1025 | ||
1026 | spin_lock(&info->lock); | 1026 | spin_lock(&info->lock); |
1027 | wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); | 1027 | wrap = urb_to_wrap(urb, &info->rx_urbs_submitted); |
1028 | if (!wrap) { | 1028 | if (!wrap) { |
1029 | spin_unlock(&info->lock); | 1029 | spin_unlock(&info->lock); |
1030 | err("%s - Not my urb!", __FUNCTION__); | 1030 | err("%s - Not my urb!", __func__); |
1031 | return; | 1031 | return; |
1032 | } | 1032 | } |
1033 | list_del(&wrap->list); | 1033 | list_del(&wrap->list); |
@@ -1035,14 +1035,14 @@ static void whiteheat_read_callback(struct urb *urb) | |||
1035 | 1035 | ||
1036 | if (status) { | 1036 | if (status) { |
1037 | dbg("%s - nonzero read bulk status received: %d", | 1037 | dbg("%s - nonzero read bulk status received: %d", |
1038 | __FUNCTION__, status); | 1038 | __func__, status); |
1039 | spin_lock(&info->lock); | 1039 | spin_lock(&info->lock); |
1040 | list_add(&wrap->list, &info->rx_urbs_free); | 1040 | list_add(&wrap->list, &info->rx_urbs_free); |
1041 | spin_unlock(&info->lock); | 1041 | spin_unlock(&info->lock); |
1042 | return; | 1042 | return; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); | 1045 | usb_serial_debug_data(debug, &port->dev, __func__, urb->actual_length, data); |
1046 | 1046 | ||
1047 | spin_lock(&info->lock); | 1047 | spin_lock(&info->lock); |
1048 | list_add_tail(&wrap->list, &info->rx_urb_q); | 1048 | list_add_tail(&wrap->list, &info->rx_urb_q); |
@@ -1064,13 +1064,13 @@ static void whiteheat_write_callback(struct urb *urb) | |||
1064 | struct whiteheat_urb_wrap *wrap; | 1064 | struct whiteheat_urb_wrap *wrap; |
1065 | int status = urb->status; | 1065 | int status = urb->status; |
1066 | 1066 | ||
1067 | dbg("%s - port %d", __FUNCTION__, port->number); | 1067 | dbg("%s - port %d", __func__, port->number); |
1068 | 1068 | ||
1069 | spin_lock(&info->lock); | 1069 | spin_lock(&info->lock); |
1070 | wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); | 1070 | wrap = urb_to_wrap(urb, &info->tx_urbs_submitted); |
1071 | if (!wrap) { | 1071 | if (!wrap) { |
1072 | spin_unlock(&info->lock); | 1072 | spin_unlock(&info->lock); |
1073 | err("%s - Not my urb!", __FUNCTION__); | 1073 | err("%s - Not my urb!", __func__); |
1074 | return; | 1074 | return; |
1075 | } | 1075 | } |
1076 | list_move(&wrap->list, &info->tx_urbs_free); | 1076 | list_move(&wrap->list, &info->tx_urbs_free); |
@@ -1078,7 +1078,7 @@ static void whiteheat_write_callback(struct urb *urb) | |||
1078 | 1078 | ||
1079 | if (status) { | 1079 | if (status) { |
1080 | dbg("%s - nonzero write bulk status received: %d", | 1080 | dbg("%s - nonzero write bulk status received: %d", |
1081 | __FUNCTION__, status); | 1081 | __func__, status); |
1082 | return; | 1082 | return; |
1083 | } | 1083 | } |
1084 | 1084 | ||
@@ -1098,7 +1098,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d | |||
1098 | int retval = 0; | 1098 | int retval = 0; |
1099 | int t; | 1099 | int t; |
1100 | 1100 | ||
1101 | dbg("%s - command %d", __FUNCTION__, command); | 1101 | dbg("%s - command %d", __func__, command); |
1102 | 1102 | ||
1103 | command_port = port->serial->port[COMMAND_PORT]; | 1103 | command_port = port->serial->port[COMMAND_PORT]; |
1104 | command_info = usb_get_serial_port_data(command_port); | 1104 | command_info = usb_get_serial_port_data(command_port); |
@@ -1112,7 +1112,7 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d | |||
1112 | command_port->write_urb->dev = port->serial->dev; | 1112 | command_port->write_urb->dev = port->serial->dev; |
1113 | retval = usb_submit_urb (command_port->write_urb, GFP_NOIO); | 1113 | retval = usb_submit_urb (command_port->write_urb, GFP_NOIO); |
1114 | if (retval) { | 1114 | if (retval) { |
1115 | dbg("%s - submit urb failed", __FUNCTION__); | 1115 | dbg("%s - submit urb failed", __func__); |
1116 | goto exit; | 1116 | goto exit; |
1117 | } | 1117 | } |
1118 | 1118 | ||
@@ -1123,19 +1123,19 @@ static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *d | |||
1123 | usb_kill_urb(command_port->write_urb); | 1123 | usb_kill_urb(command_port->write_urb); |
1124 | 1124 | ||
1125 | if (command_info->command_finished == false) { | 1125 | if (command_info->command_finished == false) { |
1126 | dbg("%s - command timed out.", __FUNCTION__); | 1126 | dbg("%s - command timed out.", __func__); |
1127 | retval = -ETIMEDOUT; | 1127 | retval = -ETIMEDOUT; |
1128 | goto exit; | 1128 | goto exit; |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) { | 1131 | if (command_info->command_finished == WHITEHEAT_CMD_FAILURE) { |
1132 | dbg("%s - command failed.", __FUNCTION__); | 1132 | dbg("%s - command failed.", __func__); |
1133 | retval = -EIO; | 1133 | retval = -EIO; |
1134 | goto exit; | 1134 | goto exit; |
1135 | } | 1135 | } |
1136 | 1136 | ||
1137 | if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) { | 1137 | if (command_info->command_finished == WHITEHEAT_CMD_COMPLETE) { |
1138 | dbg("%s - command completed.", __FUNCTION__); | 1138 | dbg("%s - command completed.", __func__); |
1139 | switch (command) { | 1139 | switch (command) { |
1140 | case WHITEHEAT_GET_DTR_RTS: | 1140 | case WHITEHEAT_GET_DTR_RTS: |
1141 | info = usb_get_serial_port_data(port); | 1141 | info = usb_get_serial_port_data(port); |
@@ -1180,7 +1180,7 @@ static int firm_setup_port(struct usb_serial_port *port) { | |||
1180 | default: | 1180 | default: |
1181 | case CS8: port_settings.bits = 8; break; | 1181 | case CS8: port_settings.bits = 8; break; |
1182 | } | 1182 | } |
1183 | dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits); | 1183 | dbg("%s - data bits = %d", __func__, port_settings.bits); |
1184 | 1184 | ||
1185 | /* determine the parity */ | 1185 | /* determine the parity */ |
1186 | if (cflag & PARENB) | 1186 | if (cflag & PARENB) |
@@ -1196,21 +1196,21 @@ static int firm_setup_port(struct usb_serial_port *port) { | |||
1196 | port_settings.parity = WHITEHEAT_PAR_EVEN; | 1196 | port_settings.parity = WHITEHEAT_PAR_EVEN; |
1197 | else | 1197 | else |
1198 | port_settings.parity = WHITEHEAT_PAR_NONE; | 1198 | port_settings.parity = WHITEHEAT_PAR_NONE; |
1199 | dbg("%s - parity = %c", __FUNCTION__, port_settings.parity); | 1199 | dbg("%s - parity = %c", __func__, port_settings.parity); |
1200 | 1200 | ||
1201 | /* figure out the stop bits requested */ | 1201 | /* figure out the stop bits requested */ |
1202 | if (cflag & CSTOPB) | 1202 | if (cflag & CSTOPB) |
1203 | port_settings.stop = 2; | 1203 | port_settings.stop = 2; |
1204 | else | 1204 | else |
1205 | port_settings.stop = 1; | 1205 | port_settings.stop = 1; |
1206 | dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop); | 1206 | dbg("%s - stop bits = %d", __func__, port_settings.stop); |
1207 | 1207 | ||
1208 | /* figure out the flow control settings */ | 1208 | /* figure out the flow control settings */ |
1209 | if (cflag & CRTSCTS) | 1209 | if (cflag & CRTSCTS) |
1210 | port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS); | 1210 | port_settings.hflow = (WHITEHEAT_HFLOW_CTS | WHITEHEAT_HFLOW_RTS); |
1211 | else | 1211 | else |
1212 | port_settings.hflow = WHITEHEAT_HFLOW_NONE; | 1212 | port_settings.hflow = WHITEHEAT_HFLOW_NONE; |
1213 | dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__, | 1213 | dbg("%s - hardware flow control = %s %s %s %s", __func__, |
1214 | (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "", | 1214 | (port_settings.hflow & WHITEHEAT_HFLOW_CTS) ? "CTS" : "", |
1215 | (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "", | 1215 | (port_settings.hflow & WHITEHEAT_HFLOW_RTS) ? "RTS" : "", |
1216 | (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "", | 1216 | (port_settings.hflow & WHITEHEAT_HFLOW_DSR) ? "DSR" : "", |
@@ -1221,15 +1221,15 @@ static int firm_setup_port(struct usb_serial_port *port) { | |||
1221 | port_settings.sflow = WHITEHEAT_SFLOW_RXTX; | 1221 | port_settings.sflow = WHITEHEAT_SFLOW_RXTX; |
1222 | else | 1222 | else |
1223 | port_settings.sflow = WHITEHEAT_SFLOW_NONE; | 1223 | port_settings.sflow = WHITEHEAT_SFLOW_NONE; |
1224 | dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow); | 1224 | dbg("%s - software flow control = %c", __func__, port_settings.sflow); |
1225 | 1225 | ||
1226 | port_settings.xon = START_CHAR(port->tty); | 1226 | port_settings.xon = START_CHAR(port->tty); |
1227 | port_settings.xoff = STOP_CHAR(port->tty); | 1227 | port_settings.xoff = STOP_CHAR(port->tty); |
1228 | dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff); | 1228 | dbg("%s - XON = %2x, XOFF = %2x", __func__, port_settings.xon, port_settings.xoff); |
1229 | 1229 | ||
1230 | /* get the baud rate wanted */ | 1230 | /* get the baud rate wanted */ |
1231 | port_settings.baud = tty_get_baud_rate(port->tty); | 1231 | port_settings.baud = tty_get_baud_rate(port->tty); |
1232 | dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud); | 1232 | dbg("%s - baud rate = %d", __func__, port_settings.baud); |
1233 | 1233 | ||
1234 | /* fixme: should set validated settings */ | 1234 | /* fixme: should set validated settings */ |
1235 | tty_encode_baud_rate(port->tty, port_settings.baud, port_settings.baud); | 1235 | tty_encode_baud_rate(port->tty, port_settings.baud, port_settings.baud); |
@@ -1312,7 +1312,7 @@ static int start_command_port(struct usb_serial *serial) | |||
1312 | command_port->read_urb->dev = serial->dev; | 1312 | command_port->read_urb->dev = serial->dev; |
1313 | retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); | 1313 | retval = usb_submit_urb(command_port->read_urb, GFP_KERNEL); |
1314 | if (retval) { | 1314 | if (retval) { |
1315 | err("%s - failed submitting read urb, error %d", __FUNCTION__, retval); | 1315 | err("%s - failed submitting read urb, error %d", __func__, retval); |
1316 | goto exit; | 1316 | goto exit; |
1317 | } | 1317 | } |
1318 | } | 1318 | } |
@@ -1448,7 +1448,7 @@ static void rx_data_softint(struct work_struct *work) | |||
1448 | urb->dev = port->serial->dev; | 1448 | urb->dev = port->serial->dev; |
1449 | result = usb_submit_urb(urb, GFP_ATOMIC); | 1449 | result = usb_submit_urb(urb, GFP_ATOMIC); |
1450 | if (result) { | 1450 | if (result) { |
1451 | err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); | 1451 | err("%s - failed resubmitting read urb, error %d", __func__, result); |
1452 | spin_lock_irqsave(&info->lock, flags); | 1452 | spin_lock_irqsave(&info->lock, flags); |
1453 | list_add(tmp, &info->rx_urbs_free); | 1453 | list_add(tmp, &info->rx_urbs_free); |
1454 | continue; | 1454 | continue; |