Input: xpad - fix build failure
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 27 Apr 2008 04:10:11 +0000 (00:10 -0400)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 27 Apr 2008 04:10:11 +0000 (00:10 -0400)
If both CONFIG_JOYSTICK_XPAD_FF and CONFIG_JOYSTICK_XPAD_LEDS are unset
xpad_bulk_out is not defined and build fails. Move it out of the #ifdef
block so it is always defined.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/joystick/xpad.c

index 52ddb04644abaebd5a71af2d8583ec70bdde583d..d1c0e720d3f5504be3085deded040604a5d65469 100644 (file)
@@ -442,6 +442,23 @@ exit:
                     __FUNCTION__, retval);
 }
 
+static void xpad_bulk_out(struct urb *urb)
+{
+       switch (urb->status) {
+       case 0:
+               /* success */
+               break;
+       case -ECONNRESET:
+       case -ENOENT:
+       case -ESHUTDOWN:
+               /* this urb is terminated, clean up */
+               dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
+               break;
+       default:
+               dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
+       }
+}
+
 #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS)
 static void xpad_irq_out(struct urb *urb)
 {
@@ -471,23 +488,6 @@ exit:
                    __FUNCTION__, retval);
 }
 
-static void xpad_bulk_out(struct urb *urb)
-{
-       switch (urb->status) {
-       case 0:
-               /* success */
-               break;
-       case -ECONNRESET:
-       case -ENOENT:
-       case -ESHUTDOWN:
-               /* this urb is terminated, clean up */
-               dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status);
-               break;
-       default:
-               dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status);
-       }
-}
-
 static int xpad_init_output(struct usb_interface *intf, struct usb_xpad *xpad)
 {
        struct usb_endpoint_descriptor *ep_irq_out;