On Sun, 14 May 2006, Mauro Carvalho Chehab wrote: > > > > Include meda/v4l2-common.h instead of manual extern prototype for > Typo: midia, instead of meda. Typo: media ;) > This patch uses a very weird logic... It would make the gentree scripts > too much complex without need. I would, instead do: > > at linux/drivers/media/video/usbvideo/konicawc.c: > > #include <linux/module.h> > #include <linux/init.h> > #include <linux/input.h> > #include "compat.h" This won't work. The usb_to_input_id() function in compat.h needs both linux/usb.h and linux/input.h to be included _before_ it is defined. This is the relevant include order before any changes: linux/input.h linux/usb_input.h usbvideo.h compat.h linux/videodev.h (must be after compat.h) linux/usb.h If you take my patch and strip out compat.h and #if/#define V4LCOMPAT code, the rest of the code is exactly the same as what was there before. I have a version that I thought was nicer, but it requires changing the includes in konicawc.c a bit. diff konicawc.c #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/input.h> +#include <linux/usb.h> +#include "compat.h" /* it's either this or version.h */ +#ifndef V4LCOMPAT_NO_USB_INPUT +#include <linux/usb_input.h> +#endif code in compat.h: /* only use this if linux/usb.h and linux/input.h have been included */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && \ defined(__LINUX_USB_H) && defined(_INPUT_H) /* Found in linux/usb_input.h in 2.6.13 */ #define V4LCOMPAT_NO_USB_INPUT static inline void usb_to_input_id(const struct usb_device *dev, struct input_id *id) I think this version is much nicer, but it means that after the compat stuff is stripped, there will be an extra #include <linux/usb.h>. _______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb