[linux-dvb] mt9m111.c in latest v4l-dvb doesn't compile under

Andy Walls awalls at radix.net
Fri Aug 22 21:07:50 CEST 2008

[andy at morgan v4l-dvb]$ make
make -C /home/andy/cx18dev/v4l-dvb/v4l 
make[1]: Entering directory `/home/andy/cx18dev/v4l-dvb/v4l'
creating symbolic links...
Kernel build directory is /lib/modules/
make -C /lib/modules/ SUBDIRS=/home/andy/cx18dev/v4l-dvb/v4l  modules
make[2]: Entering directory `/usr/src/kernels/'
  CC [M]  /home/andy/cx18dev/v4l-dvb/v4l/mt9m111.o
/home/andy/cx18dev/v4l-dvb/v4l/mt9m111.c:943: error: array type has incomplete element type
/home/andy/cx18dev/v4l-dvb/v4l/mt9m111.c:953: warning: initialization from incompatible pointer type
/home/andy/cx18dev/v4l-dvb/v4l/mt9m111.c:955: error: unknown field 'id_table' specified in initializer
make[3]: *** [/home/andy/cx18dev/v4l-dvb/v4l/mt9m111.o] Error 1
make[2]: *** [_module_/home/andy/cx18dev/v4l-dvb/v4l] Error 2
make[2]: Leaving directory `/usr/src/kernels/'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/andy/cx18dev/v4l-dvb/v4l'
make: *** [all] Error 2

The offending code is this:
943 static const struct i2c_device_id mt9m111_id[] = {
944         { "mt9m111", 0 },
945         { }
946 };
947 MODULE_DEVICE_TABLE(i2c, mt9m111_id);
949 static struct i2c_driver mt9m111_i2c_driver = {
950         .driver = {
951                 .name = "mt9m111",
952         },
953         .probe          = mt9m111_probe,
954         .remove         = mt9m111_remove,
955         .id_table       = mt9m111_id,
956 };

My tags files for the kernel source and v4l-dvb don't have "struct
i2c_device_id" in them.  My kernel's i2c_driver structure has a
different declaration for probe [int (*probe)(struct i2c_client *);]
than what mt9m111_probe uses, and it doesn't have an id_table member.

Could someone add some kernel version compatibility checks?  I could
make a swag at it, but I don't think I'll get it right.


More information about the linux-dvb mailing list