Skip to content

Commit

Permalink
Input: xpad - fix build failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Apr 27, 2008
1 parent 308f0a5 commit 2043021
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions drivers/input/joystick/xpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,23 @@ static void xpad_irq_in(struct urb *urb)
__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)
{
Expand Down Expand Up @@ -471,23 +488,6 @@ static void xpad_irq_out(struct urb *urb)
__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;
Expand Down

0 comments on commit 2043021

Please sign in to comment.