From: Michael R. <re...@eu...> - 2005-04-05 06:01:50
|
Take #2: this should have gone to the list :-) Hi Paul and others, Paul Kamphuis wrote: > I created a patch file for the corrections I made to current CVS tree to > make the i2c work properly. > I applied the following changes: > drv_generic_i2c.c > - store section in the open function > - made Section variable const to remove compiler warning I reverted this one a bit. I casted the parameter on assignment to the global variable, and stored 'Driver', too. Same as in drv_generic_parport. > configure.in > - modified the i2c verification/detection to correctly detect and enable > i2c support > note: i2c support requires a 2.6 kernel and kernel headers installed. I > assume this detection would be > sufficient for proper i2c enable/disable But it still does not work here. I again get tons of errors: gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/X11R6/include -D_GNU_SOURCE -Wall -W -g -O2 -c drv_generic_i2c.c In file included from /usr/include/linux/sched.h:12, from /usr/include/linux/module.h:10, from /usr/include/linux/i2c.h:31, from drv_generic_i2c.c:48: /usr/include/linux/jiffies.h:16: error: parse error before "jiffies_64" /usr/include/linux/jiffies.h:20: error: parse error before "get_jiffies_64" In file included from /usr/include/linux/cpumask.h:8, from /usr/include/linux/sched.h:15, from /usr/include/linux/module.h:10, from /usr/include/linux/i2c.h:31, from drv_generic_i2c.c:48: /usr/include/linux/bitmap.h: In function `bitmap_empty': /usr/include/linux/bitmap.h:15: error: `BITS_PER_LONG' undeclared (first use in this function) [.....] There must be something wrong with my linux/i2c.h... # dpkg-query -S /usr/include/linux/i2c.h linux-kernel-headers: /usr/include/linux/i2c.h # dpkg-query -l linux-kernel-headers linux-kernel-headers 2.5.999-test7-bk-17 /usr/include/linux/i2c.h: /* $Id: i2c.h,v 1.68 2003/01/21 08:08:16 kmalkki Exp $ */ I tried to replace the two directories /usr/include/linux and /usr/include /asm with symlinks to my actual kernel source, but I get (more or less) the same errors. What the hell is going wrong here? Anyway, I committed Paul's patch. So be warned - CVS may not compile! bye, Michael -- Michael Reinelt <re...@eu...> http://home.pages.at/reinelt GPG-Key 0xDF13BA50 ICQ #288386781 |