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 | e96da398ce32c0e2af5eee772feb112323f027b4 (patch) | |
tree | a4c7321499e891b61d5d1ffaa05670fd632f1553 /drivers/usb/serial/mct_u232.c | |
parent | 6fcdcf04e391c033eb9a558a744d8729d52e646e (diff) |
USB: serial: mct_u232: 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: Wolfgang Grandegger <wolfgang@ces.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/mct_u232.c')
-rw-r--r-- | drivers/usb/serial/mct_u232.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 204f0f928f6c..2a3fabcf5186 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -516,10 +516,11 @@ static void mct_u232_read_int_callback (struct urb *urb) | |||
516 | struct usb_serial *serial = port->serial; | 516 | struct usb_serial *serial = port->serial; |
517 | struct tty_struct *tty; | 517 | struct tty_struct *tty; |
518 | unsigned char *data = urb->transfer_buffer; | 518 | unsigned char *data = urb->transfer_buffer; |
519 | int status; | 519 | int retval; |
520 | int status = urb->status; | ||
520 | unsigned long flags; | 521 | unsigned long flags; |
521 | 522 | ||
522 | switch (urb->status) { | 523 | switch (status) { |
523 | case 0: | 524 | case 0: |
524 | /* success */ | 525 | /* success */ |
525 | break; | 526 | break; |
@@ -527,10 +528,12 @@ static void mct_u232_read_int_callback (struct urb *urb) | |||
527 | case -ENOENT: | 528 | case -ENOENT: |
528 | case -ESHUTDOWN: | 529 | case -ESHUTDOWN: |
529 | /* this urb is terminated, clean up */ | 530 | /* this urb is terminated, clean up */ |
530 | dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); | 531 | dbg("%s - urb shutting down with status: %d", |
532 | __FUNCTION__, status); | ||
531 | return; | 533 | return; |
532 | default: | 534 | default: |
533 | dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); | 535 | dbg("%s - nonzero urb status received: %d", |
536 | __FUNCTION__, status); | ||
534 | goto exit; | 537 | goto exit; |
535 | } | 538 | } |
536 | 539 | ||
@@ -594,10 +597,10 @@ static void mct_u232_read_int_callback (struct urb *urb) | |||
594 | #endif | 597 | #endif |
595 | spin_unlock_irqrestore(&priv->lock, flags); | 598 | spin_unlock_irqrestore(&priv->lock, flags); |
596 | exit: | 599 | exit: |
597 | status = usb_submit_urb (urb, GFP_ATOMIC); | 600 | retval = usb_submit_urb (urb, GFP_ATOMIC); |
598 | if (status) | 601 | if (retval) |
599 | err ("%s - usb_submit_urb failed with result %d", | 602 | err ("%s - usb_submit_urb failed with result %d", |
600 | __FUNCTION__, status); | 603 | __FUNCTION__, retval); |
601 | } /* mct_u232_read_int_callback */ | 604 | } /* mct_u232_read_int_callback */ |
602 | 605 | ||
603 | static void mct_u232_set_termios (struct usb_serial_port *port, | 606 | static void mct_u232_set_termios (struct usb_serial_port *port, |