Commit 33fea2b2 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: atm: usbatm: 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.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 508330eb
...@@ -257,9 +257,10 @@ static void usbatm_complete(struct urb *urb) ...@@ -257,9 +257,10 @@ static void usbatm_complete(struct urb *urb)
{ {
struct usbatm_channel *channel = urb->context; struct usbatm_channel *channel = urb->context;
unsigned long flags; unsigned long flags;
int status = urb->status;
vdbg("%s: urb 0x%p, status %d, actual_length %d", vdbg("%s: urb 0x%p, status %d, actual_length %d",
__func__, urb, urb->status, urb->actual_length); __func__, urb, status, urb->actual_length);
/* usually in_interrupt(), but not always */ /* usually in_interrupt(), but not always */
spin_lock_irqsave(&channel->lock, flags); spin_lock_irqsave(&channel->lock, flags);
...@@ -269,16 +270,16 @@ static void usbatm_complete(struct urb *urb) ...@@ -269,16 +270,16 @@ static void usbatm_complete(struct urb *urb)
spin_unlock_irqrestore(&channel->lock, flags); spin_unlock_irqrestore(&channel->lock, flags);
if (unlikely(urb->status) && if (unlikely(status) &&
(!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) ||
urb->status != -EILSEQ )) status != -EILSEQ ))
{ {
if (urb->status == -ESHUTDOWN) if (status == -ESHUTDOWN)
return; return;
if (printk_ratelimit()) if (printk_ratelimit())
atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n",
__func__, urb, urb->status); __func__, urb, status);
/* throttle processing in case of an error */ /* throttle processing in case of an error */
mod_timer(&channel->delay, jiffies + msecs_to_jiffies(THROTTLE_MSECS)); mod_timer(&channel->delay, jiffies + msecs_to_jiffies(THROTTLE_MSECS));
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment