USB: misc: phidgetmotorcontrol: 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>
This commit is contained in:
@@ -95,9 +95,10 @@ static void motorcontrol_irq(struct urb *urb)
|
|||||||
struct motorcontrol *mc = urb->context;
|
struct motorcontrol *mc = urb->context;
|
||||||
unsigned char *buffer = mc->data;
|
unsigned char *buffer = mc->data;
|
||||||
int i, level;
|
int i, level;
|
||||||
int status;
|
int retval;
|
||||||
|
int status = urb->status;;
|
||||||
|
|
||||||
switch (urb->status) {
|
switch (status) {
|
||||||
case 0: /* success */
|
case 0: /* success */
|
||||||
break;
|
break;
|
||||||
case -ECONNRESET: /* unlink */
|
case -ECONNRESET: /* unlink */
|
||||||
@@ -151,12 +152,12 @@ static void motorcontrol_irq(struct urb *urb)
|
|||||||
schedule_delayed_work(&mc->do_notify, 0);
|
schedule_delayed_work(&mc->do_notify, 0);
|
||||||
|
|
||||||
resubmit:
|
resubmit:
|
||||||
status = usb_submit_urb(urb, GFP_ATOMIC);
|
retval = usb_submit_urb(urb, GFP_ATOMIC);
|
||||||
if (status)
|
if (retval)
|
||||||
dev_err(&mc->intf->dev,
|
dev_err(&mc->intf->dev,
|
||||||
"can't resubmit intr, %s-%s/motorcontrol0, status %d",
|
"can't resubmit intr, %s-%s/motorcontrol0, retval %d",
|
||||||
mc->udev->bus->bus_name,
|
mc->udev->bus->bus_name,
|
||||||
mc->udev->devpath, status);
|
mc->udev->devpath, retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_notify(struct work_struct *work)
|
static void do_notify(struct work_struct *work)
|
||||||
|
Reference in New Issue
Block a user