[linux-dvb] cumulative patch for 2.6.12-rc3

C.Y.M syphyr at gmail.com
Fri Apr 22 01:04:44 CEST 2005


I noticed that 2.6.12-rc3 was just released on kernel.org so I figured I would
help out by re-submitting the patches for the current cvs dvb-kernel.  Most of
the changes from the previous patch are in the usb code.  I have tried to divide
 the changes up by saa7146, I2C, and HZ.

Best Regards,
C.Y.M.
-------------- next part --------------
--- dvb-kernel/linux/include/media/saa7146.h.orig      2005-03-05 13:40:47.000000000 -0800
+++ dvb-kernel/linux/include/media/saa7146.h   2005-03-05 13:41:31.000000000 -0800
@@ -169,7 +169,7 @@

 /* from saa7146_i2c.c */
 int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate);
-int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg msgs[], int num, int retries);
+int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, int num,  int retries);

 /* from saa7146_core.c */
 extern struct list_head saa7146_devices;
--- dvb-kernel/linux/drivers/media/common/saa7146_video.c.orig	2005-03-05 13:36:37.000000000 -0800
+++ dvb-kernel/linux/drivers/media/common/saa7146_video.c	2005-03-05 13:38:45.000000000 -0800
@@ -889,7 +889,7 @@
 
                 strcpy(cap->driver, "saa7146 v4l2");
 		strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
-		sprintf(cap->bus_info,"PCI:%s",dev->pci->slot_name);
+		sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
 		cap->version = SAA7146_VERSION_CODE;
 		cap->capabilities =
 			V4L2_CAP_VIDEO_CAPTURE |
--- dvb-kernel/linux/drivers/media/common/saa7146_i2c.c.orig	2005-03-02 21:15:05.000000000 -0800
+++ dvb-kernel/linux/drivers/media/common/saa7146_i2c.c	2005-03-05 13:43:00.000000000 -0800
@@ -25,7 +25,7 @@
    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. */
-static int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
+static int saa7146_i2c_msg_prepare(const struct i2c_msg *m, int num, u32 *op)
 {
 	int h1, h2;
 	int i, j, addr;
@@ -89,7 +89,7 @@
    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. */
-static int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
+static int saa7146_i2c_msg_cleanup(const struct i2c_msg *m, int num, u32 *op)
 {
 	int i, j;
 	int op_count = 0;
@@ -272,7 +272,7 @@
 	return 0;
 }
 
-int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], int num, int retries)
+int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries)
 {
 	int i = 0, count = 0;
 	u32* buffer = dev->d_i2c.cpu_addr;
@@ -372,7 +372,7 @@
 }
 
 /* utility functions */
-static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
+static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num)
 {
 	struct saa7146_dev* dev = i2c_get_adapdata(adapter);
 
-------------- next part --------------
--- dvb-kernel/linux/drivers/media/dvb/b2c2/skystar2.c.orig	2005-02-11 17:57:54.000000000 -0800
+++ dvb-kernel/linux/drivers/media/dvb/b2c2/skystar2.c	2005-03-05 16:09:02.000000000 -0800
@@ -297,7 +297,7 @@
 	return buf - start;
 }
 
-static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msgs[], int num)
+static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msgs, int num)
 {
 	struct adapter *tmp = i2c_get_adapdata(adapter);
 	int i, ret = 0;
--- dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c.orig	2005-02-19 01:16:49.000000000 -0800
+++ dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2005-03-05 16:09:02.000000000 -0800
@@ -242,7 +242,7 @@
 	return rcv_len;
 }
 
-static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
+static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num)
 {
 	struct ttusb *ttusb = i2c_get_adapdata(adapter);
 	int i = 0;
--- dvb-kernel/linux/drivers/media/dvb/dvb-usb/dibusb-common.c.orig	2005-04-21 15:17:16.000000000 -0700
+++ dvb-kernel/linux/drivers/media/dvb/dvb-usb/dibusb-common.c	2005-04-21 15:18:28.000000000 -0700
@@ -110,7 +110,7 @@
 /*
  * I2C master xfer function
  */
-static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num)
+static int dibusb_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg *msg,int num)
 {
 	struct dvb_usb_device *d = i2c_get_adapdata(adap);
 	int i;
-------------- next part --------------
--- dvb-kernel/linux/drivers/media/dvb/cinergyT2/cinergyT2.c.orig	2005-01-21 15:58:30.000000000 -0800
+++ dvb-kernel/linux/drivers/media/dvb/cinergyT2/cinergyT2.c	2005-03-09 11:26:15.000000000 -0800
@@ -212,7 +212,7 @@
 	int ret;
 
 	ret = usb_bulk_msg(cinergyt2->udev, usb_sndbulkpipe(cinergyt2->udev, 1),
-			   send_buf, send_buf_len, &actual_len, HZ);
+			   send_buf, send_buf_len, &actual_len, 1000);
 
 	if (ret)
 		dprintk(1, "usb_bulk_msg (send) failed, err %i\n", ret);
@@ -221,7 +221,7 @@
 		recv_buf = &dummy;
 
 	ret = usb_bulk_msg(cinergyt2->udev, usb_rcvbulkpipe(cinergyt2->udev, 1),
-			   recv_buf, recv_buf_len, &actual_len, HZ);
+			   recv_buf, recv_buf_len, &actual_len, 1000);
 
 	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-03-09 11:15:05.000000000 -0800
+++ dvb-kernel/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2005-03-09 11:33:39.000000000 -0800
@@ -152,7 +152,7 @@
 		return -EAGAIN;
 
 	err = usb_bulk_msg(ttusb->dev, ttusb->bulk_out_pipe,
-			   (u8 *) data, len, &actual_len, HZ);
+			   (u8 *) data, len, &actual_len, 1000);
 	if (err != 0) {
 		dprintk("%s: usb_bulk_msg(send) failed, err == %i!\n",
 			__FUNCTION__, err);
@@ -167,7 +167,7 @@
 	}
 
 	err = usb_bulk_msg(ttusb->dev, ttusb->bulk_in_pipe,
-			   ttusb->last_result, 32, &actual_len, HZ);
+			   ttusb->last_result, 32, &actual_len, 1000);
 
 	if (err != 0) {
 		printk("%s: failed, receive error %d\n", __FUNCTION__,
--- dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c.orig	2005-03-02 21:15:39.000000000 -0800
+++ dvb-kernel/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c	2005-03-09 11:36:21.000000000 -0800
@@ -295,7 +295,7 @@
 	}
 
 	result = usb_bulk_msg(dec->udev, dec->command_pipe, b,
-			      COMMAND_PACKET_SIZE + 4, &actual_len, HZ);
+			      COMMAND_PACKET_SIZE + 4, &actual_len, 1000);
 
 	if (result) {
 		printk("%s: command bulk message failed: error %d\n",
@@ -306,7 +306,7 @@
 	}
 
 	result = usb_bulk_msg(dec->udev, dec->result_pipe, b,
-			      COMMAND_PACKET_SIZE + 4, &actual_len, HZ);
+			      COMMAND_PACKET_SIZE + 4, &actual_len, 1000);
 
 	if (result) {
 		printk("%s: result bulk message failed: error %d\n",
@@ -1334,12 +1334,12 @@
 		if (j >= ARM_PACKET_SIZE) {
 			result = usb_bulk_msg(dec->udev, dec->command_pipe, b,
 					      ARM_PACKET_SIZE, &actual_len,
-					      HZ / 10);
+					      100);
 			j = 0;
 		} else if (size < COMMAND_PACKET_SIZE) {
 			result = usb_bulk_msg(dec->udev, dec->command_pipe, b,
 					      j - COMMAND_PACKET_SIZE + size,
-					      &actual_len, HZ / 10);
+					      &actual_len, 100);
 		}
 	}
 
--- dvb-kernel/linux/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c.orig	2005-04-21 15:27:14.000000000 -0700
+++ dvb-kernel/linux/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c	2005-04-21 15:31:23.000000000 -0700
@@ -30,7 +30,7 @@
 static int usb_cypress_writemem(struct usb_device *udev,u16 addr,u8 *data, u8 len)
 {
 	return usb_control_msg(udev, usb_sndctrlpipe(udev,0),
-			0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len, 5*HZ);
+			0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len, 5000);
 }
 
 int usb_cypress_load_firmware(struct usb_device *udev, const char *filename, int type)


More information about the linux-dvb mailing list