diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-18 10:58:02 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-19 17:46:07 -0700 |
commit | 2fe8c3f1538e8db2b853f10480584679b0c336f1 (patch) | |
tree | 72e35329af3fce19605682c81da5f74aeaf80fad /drivers/usb/misc | |
parent | 64771a0f19320f73ab4be69db591ba51a17d7748 (diff) | |
download | op-kernel-dev-2fe8c3f1538e8db2b853f10480584679b0c336f1.zip op-kernel-dev-2fe8c3f1538e8db2b853f10480584679b0c336f1.tar.gz |
USB: misc: phidgetkit: 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/misc')
-rw-r--r-- | drivers/usb/misc/phidgetkit.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index 371bf2b..aa9bcce 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c @@ -305,9 +305,10 @@ static void interfacekit_irq(struct urb *urb) struct interfacekit *kit = urb->context; unsigned char *buffer = kit->data; int i, level, sensor; - int status; + int retval; + int status = urb->status; - switch (urb->status) { + switch (status) { case 0: /* success */ break; case -ECONNRESET: /* unlink */ @@ -377,11 +378,11 @@ static void interfacekit_irq(struct urb *urb) schedule_delayed_work(&kit->do_notify, 0); resubmit: - status = usb_submit_urb(urb, GFP_ATOMIC); - if (status) - err("can't resubmit intr, %s-%s/interfacekit0, status %d", + retval = usb_submit_urb(urb, GFP_ATOMIC); + if (retval) + err("can't resubmit intr, %s-%s/interfacekit0, retval %d", kit->udev->bus->bus_name, - kit->udev->devpath, status); + kit->udev->devpath, retval); } static void do_notify(struct work_struct *work) |