
Originally Posted by
eleniontolto
Code:
thetrap@XBMC:~/xpad$ make
make modules -C /usr/src/linux-headers-2.6.27-7-generic SUBDIRS=/home/thetrap/xpad
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-7-generic'
CC [M] /home/thetrap/xpad/xpad.o
/home/thetrap/xpad/xpad.c: In function ‘xpad_open’:
/home/thetrap/xpad/xpad.c:382: error: ‘struct input_dev’ has no member named ‘private’
/home/thetrap/xpad/xpad.c: In function ‘xpad_close’:
/home/thetrap/xpad/xpad.c:408: error: ‘struct input_dev’ has no member named ‘private’
/home/thetrap/xpad/xpad.c: In function ‘xpad_probe’:
/home/thetrap/xpad/xpad.c:496: error: ‘struct input_dev’ has no member named ‘cdev’
/home/thetrap/xpad/xpad.c:497: error: ‘struct input_dev’ has no member named ‘private’
make[2]: *** [/home/thetrap/xpad/xpad.o] Error 1
make[1]: *** [_module_/home/thetrap/xpad] Error 2
make[1]: Leaving direct
To make the code compile I did this:
Changed lines 382 and 408 in xpad.c from
Code:
struct usb_xpad *xpad = dev->private;
to
Code:
struct usb_xpad *xpad = input_get_drvdata(dev);
line 496 from
Code:
input_dev->cdev.dev = &intf->dev;
to
Code:
input_dev->dev.parent = &intf->dev;
and line 497 from
Code:
input_dev->private = xpad;
to
Code:
input_set_drvdata(input_dev, xpad);
I hope this works for you.
This way I made the Microsoft XBox360 Gamepad work under Ubuntu 9.04 - Jaunty Jackalope x64. I am not sure if I needed to do that since I read the controller works out of the box in Jaunty. Maybe all you need to do is start jscalibrator. This will initialize the controller and you can use it to test and calibrate the gamepad.
Bookmarks