]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/input/joystick/xpad.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / drivers / input / joystick / xpad.c
index d1c0e720d3f5504be3085deded040604a5d65469..b29e3affb805a97126ccee39dcc867cd6e40dfe3 100644 (file)
@@ -405,9 +405,11 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha
 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;
@@ -416,11 +418,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;
        }
 
@@ -462,9 +464,11 @@ static void xpad_bulk_out(struct urb *urb)
 #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS)
 static void xpad_irq_out(struct urb *urb)
 {
-       int retval;
+       int retval, status;
 
-       switch (urb->status) {
+       status = urb->status;
+
+       switch (status) {
                case 0:
                /* success */
                break;
@@ -473,11 +477,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;
        }