diff options
Diffstat (limited to 'drivers/usb/serial/keyspan.c')
-rw-r--r-- | drivers/usb/serial/keyspan.c | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index fa91ddee2458..f2a6fce5de1e 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -427,14 +427,15 @@ static void usa26_indat_callback(struct urb *urb) | |||
427 | struct usb_serial_port *port; | 427 | struct usb_serial_port *port; |
428 | struct tty_struct *tty; | 428 | struct tty_struct *tty; |
429 | unsigned char *data = urb->transfer_buffer; | 429 | unsigned char *data = urb->transfer_buffer; |
430 | int status = urb->status; | ||
430 | 431 | ||
431 | dbg ("%s", __FUNCTION__); | 432 | dbg ("%s", __FUNCTION__); |
432 | 433 | ||
433 | endpoint = usb_pipeendpoint(urb->pipe); | 434 | endpoint = usb_pipeendpoint(urb->pipe); |
434 | 435 | ||
435 | if (urb->status) { | 436 | if (status) { |
436 | dbg("%s - nonzero status: %x on endpoint %d.", | 437 | dbg("%s - nonzero status: %x on endpoint %d.", |
437 | __FUNCTION__, urb->status, endpoint); | 438 | __FUNCTION__, status, endpoint); |
438 | return; | 439 | return; |
439 | } | 440 | } |
440 | 441 | ||
@@ -519,11 +520,12 @@ static void usa26_instat_callback(struct urb *urb) | |||
519 | struct usb_serial_port *port; | 520 | struct usb_serial_port *port; |
520 | struct keyspan_port_private *p_priv; | 521 | struct keyspan_port_private *p_priv; |
521 | int old_dcd_state, err; | 522 | int old_dcd_state, err; |
523 | int status = urb->status; | ||
522 | 524 | ||
523 | serial = (struct usb_serial *) urb->context; | 525 | serial = (struct usb_serial *) urb->context; |
524 | 526 | ||
525 | if (urb->status) { | 527 | if (status) { |
526 | dbg("%s - nonzero status: %x", __FUNCTION__, urb->status); | 528 | dbg("%s - nonzero status: %x", __FUNCTION__, status); |
527 | return; | 529 | return; |
528 | } | 530 | } |
529 | if (urb->actual_length != 9) { | 531 | if (urb->actual_length != 9) { |
@@ -587,6 +589,7 @@ static void usa28_indat_callback(struct urb *urb) | |||
587 | struct tty_struct *tty; | 589 | struct tty_struct *tty; |
588 | unsigned char *data; | 590 | unsigned char *data; |
589 | struct keyspan_port_private *p_priv; | 591 | struct keyspan_port_private *p_priv; |
592 | int status = urb->status; | ||
590 | 593 | ||
591 | dbg ("%s", __FUNCTION__); | 594 | dbg ("%s", __FUNCTION__); |
592 | 595 | ||
@@ -598,9 +601,9 @@ static void usa28_indat_callback(struct urb *urb) | |||
598 | return; | 601 | return; |
599 | 602 | ||
600 | do { | 603 | do { |
601 | if (urb->status) { | 604 | if (status) { |
602 | dbg("%s - nonzero status: %x on endpoint %d.", | 605 | dbg("%s - nonzero status: %x on endpoint %d.", |
603 | __FUNCTION__, urb->status, usb_pipeendpoint(urb->pipe)); | 606 | __FUNCTION__, status, usb_pipeendpoint(urb->pipe)); |
604 | return; | 607 | return; |
605 | } | 608 | } |
606 | 609 | ||
@@ -656,11 +659,12 @@ static void usa28_instat_callback(struct urb *urb) | |||
656 | struct usb_serial_port *port; | 659 | struct usb_serial_port *port; |
657 | struct keyspan_port_private *p_priv; | 660 | struct keyspan_port_private *p_priv; |
658 | int old_dcd_state; | 661 | int old_dcd_state; |
662 | int status = urb->status; | ||
659 | 663 | ||
660 | serial = (struct usb_serial *) urb->context; | 664 | serial = (struct usb_serial *) urb->context; |
661 | 665 | ||
662 | if (urb->status) { | 666 | if (status) { |
663 | dbg("%s - nonzero status: %x", __FUNCTION__, urb->status); | 667 | dbg("%s - nonzero status: %x", __FUNCTION__, status); |
664 | return; | 668 | return; |
665 | } | 669 | } |
666 | 670 | ||
@@ -747,13 +751,14 @@ static void usa49_instat_callback(struct urb *urb) | |||
747 | struct usb_serial_port *port; | 751 | struct usb_serial_port *port; |
748 | struct keyspan_port_private *p_priv; | 752 | struct keyspan_port_private *p_priv; |
749 | int old_dcd_state; | 753 | int old_dcd_state; |
754 | int status = urb->status; | ||
750 | 755 | ||
751 | dbg ("%s", __FUNCTION__); | 756 | dbg ("%s", __FUNCTION__); |
752 | 757 | ||
753 | serial = (struct usb_serial *) urb->context; | 758 | serial = (struct usb_serial *) urb->context; |
754 | 759 | ||
755 | if (urb->status) { | 760 | if (status) { |
756 | dbg("%s - nonzero status: %x", __FUNCTION__, urb->status); | 761 | dbg("%s - nonzero status: %x", __FUNCTION__, status); |
757 | return; | 762 | return; |
758 | } | 763 | } |
759 | 764 | ||
@@ -813,14 +818,15 @@ static void usa49_indat_callback(struct urb *urb) | |||
813 | struct usb_serial_port *port; | 818 | struct usb_serial_port *port; |
814 | struct tty_struct *tty; | 819 | struct tty_struct *tty; |
815 | unsigned char *data = urb->transfer_buffer; | 820 | unsigned char *data = urb->transfer_buffer; |
821 | int status = urb->status; | ||
816 | 822 | ||
817 | dbg ("%s", __FUNCTION__); | 823 | dbg ("%s", __FUNCTION__); |
818 | 824 | ||
819 | endpoint = usb_pipeendpoint(urb->pipe); | 825 | endpoint = usb_pipeendpoint(urb->pipe); |
820 | 826 | ||
821 | if (urb->status) { | 827 | if (status) { |
822 | dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__, | 828 | dbg("%s - nonzero status: %x on endpoint %d.", __FUNCTION__, |
823 | urb->status, endpoint); | 829 | status, endpoint); |
824 | return; | 830 | return; |
825 | } | 831 | } |
826 | 832 | ||
@@ -865,13 +871,14 @@ static void usa49wg_indat_callback(struct urb *urb) | |||
865 | struct usb_serial_port *port; | 871 | struct usb_serial_port *port; |
866 | struct tty_struct *tty; | 872 | struct tty_struct *tty; |
867 | unsigned char *data = urb->transfer_buffer; | 873 | unsigned char *data = urb->transfer_buffer; |
874 | int status = urb->status; | ||
868 | 875 | ||
869 | dbg ("%s", __FUNCTION__); | 876 | dbg ("%s", __FUNCTION__); |
870 | 877 | ||
871 | serial = urb->context; | 878 | serial = urb->context; |
872 | 879 | ||
873 | if (urb->status) { | 880 | if (status) { |
874 | dbg("%s - nonzero status: %x", __FUNCTION__, urb->status); | 881 | dbg("%s - nonzero status: %x", __FUNCTION__, status); |
875 | return; | 882 | return; |
876 | } | 883 | } |
877 | 884 | ||
@@ -948,14 +955,15 @@ static void usa90_indat_callback(struct urb *urb) | |||
948 | struct keyspan_port_private *p_priv; | 955 | struct keyspan_port_private *p_priv; |
949 | struct tty_struct *tty; | 956 | struct tty_struct *tty; |
950 | unsigned char *data = urb->transfer_buffer; | 957 | unsigned char *data = urb->transfer_buffer; |
958 | int status = urb->status; | ||
951 | 959 | ||
952 | dbg ("%s", __FUNCTION__); | 960 | dbg ("%s", __FUNCTION__); |
953 | 961 | ||
954 | endpoint = usb_pipeendpoint(urb->pipe); | 962 | endpoint = usb_pipeendpoint(urb->pipe); |
955 | 963 | ||
956 | if (urb->status) { | 964 | if (status) { |
957 | dbg("%s - nonzero status: %x on endpoint %d.", | 965 | dbg("%s - nonzero status: %x on endpoint %d.", |
958 | __FUNCTION__, urb->status, endpoint); | 966 | __FUNCTION__, status, endpoint); |
959 | return; | 967 | return; |
960 | } | 968 | } |
961 | 969 | ||
@@ -1021,11 +1029,12 @@ static void usa90_instat_callback(struct urb *urb) | |||
1021 | struct usb_serial_port *port; | 1029 | struct usb_serial_port *port; |
1022 | struct keyspan_port_private *p_priv; | 1030 | struct keyspan_port_private *p_priv; |
1023 | int old_dcd_state, err; | 1031 | int old_dcd_state, err; |
1032 | int status = urb->status; | ||
1024 | 1033 | ||
1025 | serial = (struct usb_serial *) urb->context; | 1034 | serial = (struct usb_serial *) urb->context; |
1026 | 1035 | ||
1027 | if (urb->status) { | 1036 | if (status) { |
1028 | dbg("%s - nonzero status: %x", __FUNCTION__, urb->status); | 1037 | dbg("%s - nonzero status: %x", __FUNCTION__, status); |
1029 | return; | 1038 | return; |
1030 | } | 1039 | } |
1031 | if (urb->actual_length < 14) { | 1040 | if (urb->actual_length < 14) { |
@@ -1088,13 +1097,14 @@ static void usa67_instat_callback(struct urb *urb) | |||
1088 | struct usb_serial_port *port; | 1097 | struct usb_serial_port *port; |
1089 | struct keyspan_port_private *p_priv; | 1098 | struct keyspan_port_private *p_priv; |
1090 | int old_dcd_state; | 1099 | int old_dcd_state; |
1100 | int status = urb->status; | ||
1091 | 1101 | ||
1092 | dbg ("%s", __FUNCTION__); | 1102 | dbg ("%s", __FUNCTION__); |
1093 | 1103 | ||
1094 | serial = urb->context; | 1104 | serial = urb->context; |
1095 | 1105 | ||
1096 | if (urb->status) { | 1106 | if (status) { |
1097 | dbg("%s - nonzero status: %x", __FUNCTION__, urb->status); | 1107 | dbg("%s - nonzero status: %x", __FUNCTION__, status); |
1098 | return; | 1108 | return; |
1099 | } | 1109 | } |
1100 | 1110 | ||