]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
USB: convert away from urb->status in xpad driver
authorOliver Neukum <oliver@neukum.org>
Thu, 3 Apr 2008 19:40:59 +0000 (21:40 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Apr 2008 04:16:47 +0000 (21:16 -0700)
USB is moving to transfering status as a parameter. To ease the transition
urb->status is to be touched only once in a function. The xpad driver has
been overlooked. Dmitry wants this to go through the USB tree.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/joystick/xpad.c

index 0380597249bba224e84b55eb672cf474ff9c7496..2854c8fc334b01d98942f62a3c655dad5d669e8d 100644 (file)
@@ -339,9 +339,11 @@ static void xpad360_process_packet(struct usb_xpad *xpad,
 static void xpad_irq_in(struct urb *urb)
 {
        struct usb_xpad *xpad = urb->context;
-       int retval;
+       int retval, status;
 
-       switch (urb->status) {
+       status = urb->status;
+
+       switch (status) {
        case 0:
                /* success */
                break;
@@ -350,11 +352,11 @@ static void xpad_irq_in(struct urb *urb)
        case -ESHUTDOWN:
                /* this urb is terminated, clean up */
                dbg("%s - urb shutting down with status: %d",
-                       __FUNCTION__, urb->status);
+                       __FUNCTION__, status);
                return;
        default:
                dbg("%s - nonzero urb status received: %d",
-                       __FUNCTION__, urb->status);
+                       __FUNCTION__, status);
                goto exit;
        }
 
@@ -373,9 +375,11 @@ exit:
 #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS)
 static void xpad_irq_out(struct urb *urb)
 {
-       int retval;
+       int retval, status;
+
+       status = urb->status;
 
-       switch (urb->status) {
+       switch (status) {
                case 0:
                /* success */
                break;
@@ -384,11 +388,11 @@ static void xpad_irq_out(struct urb *urb)
                case -ESHUTDOWN:
                        /* this urb is terminated, clean up */
                        dbg("%s - urb shutting down with status: %d",
-                               __FUNCTION__, urb->status);
+                               __FUNCTION__, status);
                        return;
                default:
                        dbg("%s - nonzero urb status received: %d",
-                               __FUNCTION__, urb->status);
+                               __FUNCTION__, status);
                        goto exit;
        }