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:33 -0400 |
commit | 2a393f5fd872fad99d639812087383111074cfeb (patch) | |
tree | e0bc75f33cb96e654dd34e9ebd610a7bdece22e1 /drivers/usb/serial/io_edgeport.c | |
parent | fbd272254b034e22a5157af51c8c5907a8f69614 (diff) |
USB: serial: io_edgeport: 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: Al Borchers <alborchers@steinerpoint.com>
Cc: Peter Berger <pberger@brimson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/io_edgeport.c')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 056e1923c4de..cebb32f4a831 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -599,10 +599,11 @@ static void edge_interrupt_callback (struct urb *urb) | |||
599 | int txCredits; | 599 | int txCredits; |
600 | int portNumber; | 600 | int portNumber; |
601 | int result; | 601 | int result; |
602 | int status = urb->status; | ||
602 | 603 | ||
603 | dbg("%s", __FUNCTION__); | 604 | dbg("%s", __FUNCTION__); |
604 | 605 | ||
605 | switch (urb->status) { | 606 | switch (status) { |
606 | case 0: | 607 | case 0: |
607 | /* success */ | 608 | /* success */ |
608 | break; | 609 | break; |
@@ -610,10 +611,12 @@ static void edge_interrupt_callback (struct urb *urb) | |||
610 | case -ENOENT: | 611 | case -ENOENT: |
611 | case -ESHUTDOWN: | 612 | case -ESHUTDOWN: |
612 | /* this urb is terminated, clean up */ | 613 | /* this urb is terminated, clean up */ |
613 | dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); | 614 | dbg("%s - urb shutting down with status: %d", |
615 | __FUNCTION__, status); | ||
614 | return; | 616 | return; |
615 | default: | 617 | default: |
616 | dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); | 618 | dbg("%s - nonzero urb status received: %d", |
619 | __FUNCTION__, status); | ||
617 | goto exit; | 620 | goto exit; |
618 | } | 621 | } |
619 | 622 | ||
@@ -688,13 +691,15 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
688 | { | 691 | { |
689 | struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; | 692 | struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; |
690 | unsigned char *data = urb->transfer_buffer; | 693 | unsigned char *data = urb->transfer_buffer; |
691 | int status; | 694 | int retval; |
692 | __u16 raw_data_length; | 695 | __u16 raw_data_length; |
696 | int status = urb->status; | ||
693 | 697 | ||
694 | dbg("%s", __FUNCTION__); | 698 | dbg("%s", __FUNCTION__); |
695 | 699 | ||
696 | if (urb->status) { | 700 | if (status) { |
697 | dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); | 701 | dbg("%s - nonzero read bulk status received: %d", |
702 | __FUNCTION__, status); | ||
698 | edge_serial->read_in_progress = false; | 703 | edge_serial->read_in_progress = false; |
699 | return; | 704 | return; |
700 | } | 705 | } |
@@ -722,9 +727,11 @@ static void edge_bulk_in_callback (struct urb *urb) | |||
722 | if (edge_serial->rxBytesAvail > 0) { | 727 | if (edge_serial->rxBytesAvail > 0) { |
723 | dbg("%s - posting a read", __FUNCTION__); | 728 | dbg("%s - posting a read", __FUNCTION__); |
724 | edge_serial->read_urb->dev = edge_serial->serial->dev; | 729 | edge_serial->read_urb->dev = edge_serial->serial->dev; |
725 | status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC); | 730 | retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC); |
726 | if (status) { | 731 | if (retval) { |
727 | dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status); | 732 | dev_err(&urb->dev->dev, |
733 | "%s - usb_submit_urb(read bulk) failed, " | ||
734 | "retval = %d\n", __FUNCTION__, retval); | ||
728 | edge_serial->read_in_progress = false; | 735 | edge_serial->read_in_progress = false; |
729 | } | 736 | } |
730 | } else { | 737 | } else { |
@@ -744,11 +751,13 @@ static void edge_bulk_out_data_callback (struct urb *urb) | |||
744 | { | 751 | { |
745 | struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; | 752 | struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; |
746 | struct tty_struct *tty; | 753 | struct tty_struct *tty; |
754 | int status = urb->status; | ||
747 | 755 | ||
748 | dbg("%s", __FUNCTION__); | 756 | dbg("%s", __FUNCTION__); |
749 | 757 | ||
750 | if (urb->status) { | 758 | if (status) { |
751 | dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); | 759 | dbg("%s - nonzero write bulk status received: %d", |
760 | __FUNCTION__, status); | ||
752 | } | 761 | } |
753 | 762 | ||
754 | tty = edge_port->port->tty; | 763 | tty = edge_port->port->tty; |