diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-18 13:58:02 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-19 20:46:06 -0400 |
commit | 33fea2b2f523251d29619641451bfebdc35f4950 (patch) | |
tree | c35243a5e06705cc45d06d2ea5b475694a897377 /drivers/usb/atm | |
parent | 508330ebdacb3df07ee2a75aee8caf2c205befc8 (diff) |
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm')
-rw-r--r-- | drivers/usb/atm/usbatm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 11e9b15ca45a..e717f5b1caee 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
@@ -257,9 +257,10 @@ static void usbatm_complete(struct urb *urb) | |||
257 | { | 257 | { |
258 | struct usbatm_channel *channel = urb->context; | 258 | struct usbatm_channel *channel = urb->context; |
259 | unsigned long flags; | 259 | unsigned long flags; |
260 | int status = urb->status; | ||
260 | 261 | ||
261 | vdbg("%s: urb 0x%p, status %d, actual_length %d", | 262 | vdbg("%s: urb 0x%p, status %d, actual_length %d", |
262 | __func__, urb, urb->status, urb->actual_length); | 263 | __func__, urb, status, urb->actual_length); |
263 | 264 | ||
264 | /* usually in_interrupt(), but not always */ | 265 | /* usually in_interrupt(), but not always */ |
265 | spin_lock_irqsave(&channel->lock, flags); | 266 | spin_lock_irqsave(&channel->lock, flags); |
@@ -269,16 +270,16 @@ static void usbatm_complete(struct urb *urb) | |||
269 | 270 | ||
270 | spin_unlock_irqrestore(&channel->lock, flags); | 271 | spin_unlock_irqrestore(&channel->lock, flags); |
271 | 272 | ||
272 | if (unlikely(urb->status) && | 273 | if (unlikely(status) && |
273 | (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || | 274 | (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || |
274 | urb->status != -EILSEQ )) | 275 | status != -EILSEQ )) |
275 | { | 276 | { |
276 | if (urb->status == -ESHUTDOWN) | 277 | if (status == -ESHUTDOWN) |
277 | return; | 278 | return; |
278 | 279 | ||
279 | if (printk_ratelimit()) | 280 | if (printk_ratelimit()) |
280 | atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", | 281 | atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", |
281 | __func__, urb, urb->status); | 282 | __func__, urb, status); |
282 | /* throttle processing in case of an error */ | 283 | /* throttle processing in case of an error */ |
283 | mod_timer(&channel->delay, jiffies + msecs_to_jiffies(THROTTLE_MSECS)); | 284 | mod_timer(&channel->delay, jiffies + msecs_to_jiffies(THROTTLE_MSECS)); |
284 | } else | 285 | } else |