Le 21 sept. 05 à 06:12, Guy Yasko a écrit :
On 20 9月 2005, David Smoot spake thusly:
I have a "post February 2005" powerbook. I am now developing linux
software for my new job so I decided that I should be working under
Linux. I've got Debian 3.1 installed and just got X up and running
this morning. Now I am trying to get the touchpad to work and it
won't compile.
uname -a returns:
Linux PowerBookDebian 2.6.12-1-powerpc
I have kernel headers and kernel source installed (I think). When I
download the apple touchpad driver and type "make" I get the
following
error:
make -C /lib/modules/2.6.12-1-powerpc/build
SUBDIRS=/home/dsmoot/appletouch-0.08 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.12-1-powerpc'
CC [M] /home/dsmoot/appletouch-0.08/appletouch.o
/home/dsmoot/appletouch-0.08/appletouch.c:36:29: error:
linux/usb_input.h: No such file or directory
/home/dsmoot/appletouch-0.08/appletouch.c: In function 'atp_probe':
/home/dsmoot/appletouch-0.08/appletouch.c:378: warning: implicit
declaration of function 'usb_to_input_id'
make[2]: *** [/home/dsmoot/appletouch-0.08/appletouch.o] Error 1
make[1]: *** [_module_/home/dsmoot/appletouch-0.08] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.12-1-powerpc'
make: *** [default] Error 2
Obviously it can't find the usb_input.h file but I can't figure out
why I am missing it or where it should come from.
I'm not sure why, but others, including myself, have also run into
this problem.
This is usb_to_input_id appeared only in later versions of the kernel.
If you want to compile appletouch on older kernels you must replace the
usb_to_input_id(dev->udev, &dev->input.id);
line with:
dev->input.id.bustype = BUS_USB;
dev->input.id.vendor = id->idVendor;
dev->input.id.product = id->idProduct;
dev->input.id.version = 0x0008;
You may also need to change the prototype of atp_suspend from:
static int atp_suspend(struct usb_interface *iface, pm_message_t
message)
to:
static int atp_suspend(struct usb_interface *iface, u32 message)
Stelian.