Ok. Let me comment one by one. Next time, please post as separate emails. This is a common practice when submitting kernel patches, and help us to accept the good patches and comment the ones that may require some fix. Em Sex, 2006-05-12 às 16:27 -0700, Trent Piepho escreveu: > Here are patches for four different kernel compat issues, plus a patch > to > update versions.txt. > > Most were straight forward. The change for the usb_input.h was not so > obvious, I tried to come up something that had the least impact on the > drivers. > > Some drivers don't have compat code for changes made to struct > i2c_driver in > 2.6.16. They will still compile and insert, but leave important > fields > uninitialized, which can lock the kernel. I didn't make them work > with older > kernels, but did adjust versions.txt to be correct. > > > > > > > anexo Documento > somente texto > (compat_mutex.patch), "" > > # HG changeset patch > # User Trent Piepho <xyzzy@xxxxxxxxxxxxx> > # Node ID 11b94a9ffc4d3997290f96bd996604d4790770b5 > # Parent 9b7ee58c97f0b98c9f7b06fb2db49099307d6f81 > Add some mutex -> semaphore backward compatability changes Hmm... typo: it it compatibility :) > > From: Trent Piepho <xyzzy@xxxxxxxxxxxxx> > > Standard back compatability changes, for struct mutex added after Hmm... typo: it it compatibility :) > > 2.6.15 > Done with #define mutex semaphore in these files, because it's less > invasive. The patch itself looks good. > > > > > > > anexo Documento > somente texto > (compat_printk_ioctl.patch), "" > > # HG changeset patch > # User Trent Piepho <xyzzy@xxxxxxxxxxxxx> > # Node ID e9383e768f51327a95f1824adc1d4da294508773 > # Parent 11b94a9ffc4d3997290f96bd996604d4790770b5 > Update driver to use v4l_printk_ioctl() and v4l2-common.h > > From: Trent Piepho <xyzzy@xxxxxxxxxxxxx> > > Include meda/v4l2-common.h instead of manual extern prototype for Typo: midia, instead of meda. > v4l_printk_ioctl(). > Remove private version of same function that was for older kernels, > it's > part of v4l-dvb now on old kernels too. The patch itself seems ok and it is, in fact, simplifying its code. > > > > > > anexo Documento > somente texto > (compat_usb_input.patch), "" > > # HG changeset patch > # User Trent Piepho <xyzzy@xxxxxxxxxxxxx> > # Node ID 40ba20975e812d482474e1c07f5f3e1a98c932ed > # Parent e9383e768f51327a95f1824adc1d4da294508773 > Compat additions for usb_input.h, struct input_dev > > From: Trent Piepho <xyzzy@xxxxxxxxxxxxx> > > Struct input_dev got a new field 'cdev' in 2.6.15, put a check > compat.h > that defines V4LCOMPAT_NO_INPUT_CDEV when it's not there. Use this > define for konicawc. > > A new header file linux/usb_input.h appeared in 2.6.13. Add a > compat.h > inline function that appears there, usb_to_input_id(). This function > needs > linux/usb.h and linux/input.h. linux/usb.h can not be unconditionally > included in compat.h, as it defines symbols that conflict with code > that > doesn't normally include usb.h. As a workaround, code that uses > usb_input.h should define V4LCOMPAT_USB_INPUT before including > compat.h to > activate the compat code. 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" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) #include <linux/input.h> #include <linux/usb.h> #else #include <linux/usb_input.h> #endif ... input_dev->name = "Konicawc snapshot button"; input_dev->phys = cam->input_physname; usb_to_input_id(dev, &input_dev->id); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) input_dev->cdev.dev = &dev->dev; #endif and at compat.h: #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) static inline void usb_to_input_id(const struct usb_device *dev, struct input_id *id) { id->bustype = BUS_USB; id->vendor = le16_to_cpu(dev->descriptor.idVendor); id->product = le16_to_cpu(dev->descriptor.idProduct); id->version = le16_to_cpu(dev->descriptor.bcdDevice); } #endif > > > > > > anexo Documento > somente texto > (compat_timeout_int.patch), "" > > # HG changeset patch > # User Trent Piepho <xyzzy@xxxxxxxxxxxxx> > # Node ID 4e4c8a4653708fbaff27cc3f146119fa36603708 > # Parent 40ba20975e812d482474e1c07f5f3e1a98c932ed > Add compat.h code for schedule_timeout_interruptible() > > From: Trent Piepho <xyzzy@xxxxxxxxxxxxx> > > Add a static inline version of schedule_timeout_interruptible(), it's > only > two lines, to compat.h. Remove #if/#else code from some drivers which > used > to handled this. This patch seems ok to me. > > > > > > > anexo Documento > somente texto > (compat_versions.patch), "" > This patch seems ok to me. Cheers, Mauro. _______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb