diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-06-15 18:44:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:34:35 -0400 |
commit | 17c1b35a469b5e518b88cc509562ccfb44950145 (patch) | |
tree | 599878d87b3b36732aa4c00f063a1c7d63d85b59 /drivers/usb/serial | |
parent | 23189aee76c3297c7ff797ca8bc8e314783039ef (diff) |
USB: serial: kl5kusb105: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.
Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Utz-Uwe Haus <haus@uuhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/kl5kusb105.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index 7b085f334ceb..5a4127e62c4a 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c | |||
@@ -567,12 +567,13 @@ exit: | |||
567 | static void klsi_105_write_bulk_callback ( struct urb *urb) | 567 | static void klsi_105_write_bulk_callback ( struct urb *urb) |
568 | { | 568 | { |
569 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 569 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; |
570 | int status = urb->status; | ||
570 | 571 | ||
571 | dbg("%s - port %d", __FUNCTION__, port->number); | 572 | dbg("%s - port %d", __FUNCTION__, port->number); |
572 | 573 | ||
573 | if (urb->status) { | 574 | if (status) { |
574 | dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, | 575 | dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, |
575 | urb->status); | 576 | status); |
576 | return; | 577 | return; |
577 | } | 578 | } |
578 | 579 | ||
@@ -631,16 +632,17 @@ static void klsi_105_read_bulk_callback (struct urb *urb) | |||
631 | struct tty_struct *tty; | 632 | struct tty_struct *tty; |
632 | unsigned char *data = urb->transfer_buffer; | 633 | unsigned char *data = urb->transfer_buffer; |
633 | int rc; | 634 | int rc; |
635 | int status = urb->status; | ||
634 | 636 | ||
635 | dbg("%s - port %d", __FUNCTION__, port->number); | 637 | dbg("%s - port %d", __FUNCTION__, port->number); |
636 | 638 | ||
637 | /* The urb might have been killed. */ | 639 | /* The urb might have been killed. */ |
638 | if (urb->status) { | 640 | if (status) { |
639 | dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, | 641 | dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, |
640 | urb->status); | 642 | status); |
641 | return; | 643 | return; |
642 | } | 644 | } |
643 | 645 | ||
644 | /* The data received is again preceded by a length double-byte in LSB- | 646 | /* The data received is again preceded by a length double-byte in LSB- |
645 | * first order (see klsi_105_write() ) | 647 | * first order (see klsi_105_write() ) |
646 | */ | 648 | */ |