I was just starting to compare the changes in 2.6.12-rc4 with the latest dvb-kernel from cvs and noticed a difference in saa7146_fops.c which I am unsure about. It appears the kernel sources are using "assert_spin_locked(&dev->slock);" instead of "BUG_ON(!spin_is_locked(&dev->slock));". Is this something we want to incorporate in cvs? There are also many other changes in the rest of the sources (for example, ttpci) that do not to appear to have been checked into dvb-kernel cvs but directly into the linux kernel. Its difficult to keep track when code is changed in the linux kernel sources but there is no changelog. I have rebuilt my patches to support backwards compatibility for 2.6.11 and 2.6.12+. Please consider checking in these changes and then we can go through the rest of the differences in 2.6.12-rc4. Thanks.. Best Regards, C.Y.M. -------------- next part -------------- --- dvb-kernel/linux/drivers/media/dvb/cinergyT2/cinergyT2.c.orig 2005-05-07 04:32:22.000000000 -0700 +++ dvb-kernel/linux/drivers/media/dvb/cinergyT2/cinergyT2.c 2005-05-07 04:37:05.000000000 -0700 @@ -211,8 +211,13 @@ char dummy; int ret; +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + ret = usb_bulk_msg(cinergyt2->udev, usb_sndbulkpipe(cinergyt2->udev, 1), + send_buf, send_buf_len, &actual_len, 1000); +#else ret = usb_bulk_msg(cinergyt2->udev, usb_sndbulkpipe(cinergyt2->udev, 1), send_buf, send_buf_len, &actual_len, HZ); +#endif if (ret) dprintk(1, "usb_bulk_msg (send) failed, err %i\n", ret); @@ -220,8 +225,13 @@ if (!recv_buf) recv_buf = &dummy; +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + ret = usb_bulk_msg(cinergyt2->udev, usb_rcvbulkpipe(cinergyt2->udev, 1), + recv_buf, recv_buf_len, &actual_len, 1000); +#else ret = usb_bulk_msg(cinergyt2->udev, usb_rcvbulkpipe(cinergyt2->udev, 1), recv_buf, recv_buf_len, &actual_len, HZ); +#endif if (ret) dprintk(1, "usb_bulk_msg (read) failed, err %i\n", ret); --- dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c.orig 2005-05-07 04:37:53.000000000 -0700 +++ dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-05-07 04:40:54.000000000 -0700 @@ -151,8 +151,14 @@ if (down_interruptible(&ttusb->semusb) < 0) return -EAGAIN; +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + err = usb_bulk_msg(ttusb->dev, ttusb->bulk_out_pipe, + (u8 *) data, len, &actual_len, 1000); +#else err = usb_bulk_msg(ttusb->dev, ttusb->bulk_out_pipe, (u8 *) data, len, &actual_len, HZ); +#endif + if (err != 0) { dprintk("%s: usb_bulk_msg(send) failed, err == %i!\n", __FUNCTION__, err); @@ -166,8 +172,13 @@ return -1; } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + err = usb_bulk_msg(ttusb->dev, ttusb->bulk_in_pipe, + ttusb->last_result, 32, &actual_len, 1000); +#else err = usb_bulk_msg(ttusb->dev, ttusb->bulk_in_pipe, ttusb->last_result, 32, &actual_len, HZ); +#endif if (err != 0) { printk("%s: failed, receive error %d\n", __FUNCTION__, --- dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c.orig 2005-05-07 04:41:46.000000000 -0700 +++ dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c 2005-05-07 04:48:52.000000000 -0700 @@ -294,8 +294,13 @@ printk("\n"); } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + result = usb_bulk_msg(dec->udev, dec->command_pipe, b, + COMMAND_PACKET_SIZE + 4, &actual_len, 1000); +#else result = usb_bulk_msg(dec->udev, dec->command_pipe, b, COMMAND_PACKET_SIZE + 4, &actual_len, HZ); +#endif if (result) { printk("%s: command bulk message failed: error %d\n", @@ -305,8 +310,13 @@ return result; } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + result = usb_bulk_msg(dec->udev, dec->result_pipe, b, + COMMAND_PACKET_SIZE + 4, &actual_len, 1000); +#else result = usb_bulk_msg(dec->udev, dec->result_pipe, b, COMMAND_PACKET_SIZE + 4, &actual_len, HZ); +#endif if (result) { printk("%s: result bulk message failed: error %d\n", @@ -1332,14 +1342,26 @@ j += COMMAND_PACKET_SIZE + 4; if (j >= ARM_PACKET_SIZE) { +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + result = usb_bulk_msg(dec->udev, dec->command_pipe, b, + ARM_PACKET_SIZE, &actual_len, + 100); +#else result = usb_bulk_msg(dec->udev, dec->command_pipe, b, ARM_PACKET_SIZE, &actual_len, HZ / 10); +#endif j = 0; } else if (size < COMMAND_PACKET_SIZE) { +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + result = usb_bulk_msg(dec->udev, dec->command_pipe, b, + j - COMMAND_PACKET_SIZE + size, + &actual_len, 100); +#else result = usb_bulk_msg(dec->udev, dec->command_pipe, b, j - COMMAND_PACKET_SIZE + size, &actual_len, HZ / 10); +#endif } } --- dvb-kernel/linux/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c.orig 2005-05-07 04:49:21.000000000 -0700 +++ dvb-kernel/linux/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c 2005-05-07 04:50:51.000000000 -0700 @@ -29,8 +29,13 @@ */ static int usb_cypress_writemem(struct usb_device *udev,u16 addr,u8 *data, u8 len) { +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + return usb_control_msg(udev, usb_sndctrlpipe(udev,0), + 0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len, 5000); +#else return usb_control_msg(udev, usb_sndctrlpipe(udev,0), 0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len, 5*HZ); +#endif } int usb_cypress_load_firmware(struct usb_device *udev, const char *filename, int type) -------------- next part -------------- --- dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c.orig 2005-05-07 04:25:03.000000000 -0700 +++ dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2005-05-07 04:25:48.000000000 -0700 @@ -242,7 +242,11 @@ return rcv_len; } +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num) +#else static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) +#endif { struct ttusb *ttusb = i2c_get_adapdata(adapter); int i = 0; --- dvb-kernel/linux/drivers/media/dvb/dvb-usb/dibusb-common.c.orig 2005-05-07 04:26:42.000000000 -0700 +++ dvb-kernel/linux/drivers/media/dvb/dvb-usb/dibusb-common.c 2005-05-07 04:27:41.000000000 -0700 @@ -113,7 +113,11 @@ /* * I2C master xfer function */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg *msg,int num) +#else static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num) +#endif { struct dvb_usb_device *d = i2c_get_adapdata(adap); int i; -------------- next part -------------- --- dvb-kernel/linux/include/media/saa7146.h.orig 2005-05-07 04:02:07.000000000 -0700 +++ dvb-kernel/linux/include/media/saa7146.h 2005-05-07 04:05:43.000000000 -0700 @@ -169,7 +169,11 @@ /* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, int num, int retries); +#else int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg msgs[], int num, int retries); +#endif /* from saa7146_core.c */ extern struct list_head saa7146_devices; --- dvb-kernel/linux/drivers/media/common/saa7146_video.c.orig 2005-05-07 04:13:11.000000000 -0700 +++ dvb-kernel/linux/drivers/media/common/saa7146_video.c 2005-05-07 04:09:06.000000000 -0700 @@ -889,7 +889,11 @@ strcpy(cap->driver, "saa7146 v4l2"); strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) + sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); +#else sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name); +#endif cap->version = SAA7146_VERSION_CODE; cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | --- dvb-kernel/linux/drivers/media/common/saa7146_i2c.c.orig 2005-05-07 04:15:49.000000000 -0700 +++ dvb-kernel/linux/drivers/media/common/saa7146_i2c.c 2005-05-07 04:20:43.000000000 -0700 @@ -25,7 +25,11 @@ sent through the saa7146. have a look at the specifications p. 122 ff to understand this. it returns the number of u32s to send, or -1 in case of an error. */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op) +#else static int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op) +#endif { int h1, h2; int i, j, addr; @@ -89,7 +93,11 @@ which bytes were read through the adapter and write them back to the corresponding i2c-message. but instead, we simply write back all bytes. fixme: this could be improved. */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +static int saa7146_i2c_msg_cleanup(const struct i2c_msg *m, int num, u32 *op) +#else static int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op) +#endif { int i, j; int op_count = 0; @@ -271,8 +279,11 @@ DEB_I2C(("after: 0x%08x\n",*dword)); return 0; } - +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries) +#else int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], int num, int retries) +#endif { int i = 0, count = 0; u32* buffer = dev->d_i2c.cpu_addr; @@ -372,7 +383,11 @@ } /* utility functions */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)) +static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num) +#else static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) +#endif { struct saa7146_dev* dev = i2c_get_adapdata(adapter);