lkml.org 
[lkml]   [2008]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [build bug] Re: [PATCH 00/37] Input queue for 2.6.26 merge window
Hi Ingo,

On Sat, Apr 26, 2008 at 03:24:34PM +0200, Ingo Molnar wrote:
>
> > Input: xpad - add support for wireless xbox360 controllers
>
> via the commit above (99de0912) a build bug sneaked in:
>
> drivers/input/joystick/xpad.c: In function 'xpad_probe':
> drivers/input/joystick/xpad.c:865: error: 'xpad_bulk_out' undeclared (first usein this function)
> drivers/input/joystick/xpad.c:865: error: (Each undeclared identifier is reported only once
> drivers/input/joystick/xpad.c:865: error: for each function it appears in.)
>

Oops, sorry about that. The patch below should fix this problem.

--
Dmitry

Input: xpad - fix build failure

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 | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)

Index: work/drivers/input/joystick/xpad.c
===================================================================
--- work.orig/drivers/input/joystick/xpad.c
+++ work/drivers/input/joystick/xpad.c
@@ -444,6 +444,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)
{
@@ -475,23 +492,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;

\
 
 \ /
  Last update: 2008-04-27 06:09    [W:0.209 / U:0.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site