Just in case the fix hasn't been applied, here is a patch to 1.3.9 that has been tested on 2.6.13.1 and 2.6.14-rc1, and works on both.

Tyler Trafford wrote:
On Wed, Sep 14, 2005 at 03:50:34PM -0400, Philip Lawrence wrote:
  
This modification to the i2c-id.h file breaks the build for 1.3.9, and
affects several driver files.
    

Should be fixed now in svn.
  


diff -Naur ivtv-0.3.9/driver/cx25840-driver.c ivtv-0.3.9-philip/driver/cx25840-driver.c
--- ivtv-0.3.9/driver/cx25840-driver.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/cx25840-driver.c	2005-09-14 15:36:15.309884188 -0500
@@ -1180,7 +1180,11 @@
 
 static int cx25840_attach_adapter(struct i2c_adapter *adapter)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	if (adapter->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
+#else
+	if (adapter->id == I2C_HW_B_BT848) {
+#endif
 		CX25840_DEBUG("starting probe on adapter %s (0x%x)\n", 
 			adapter->name, adapter->id);
 		return i2c_probe(adapter, &addr_data, &cx25840_detect_client);
diff -Naur ivtv-0.3.9/driver/msp3400.c ivtv-0.3.9-philip/driver/msp3400.c
--- ivtv-0.3.9/driver/msp3400.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/msp3400.c	2005-09-14 15:55:00.918285169 -0500
@@ -1843,7 +1843,11 @@
 
 static int msp_probe(struct i2c_adapter *adap)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848))
+#else
+	if (adap->id == I2C_HW_B_BT848)
+#endif
 		return i2c_probe(adap, &addr_data, msp_attach);
 	return 0;
 }
diff -Naur ivtv-0.3.9/driver/saa7127.c ivtv-0.3.9-philip/driver/saa7127.c
--- ivtv-0.3.9/driver/saa7127.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/saa7127.c	2005-09-14 15:26:16.194278429 -0500
@@ -785,7 +785,11 @@
 
 static int saa7127_attach_adapter(struct i2c_adapter *adapter)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	if (adapter->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
+#else
+	if (adapter->id == I2C_HW_B_BT848) {
+#endif
 		return i2c_probe(adapter, &addr_data, &saa7127_detect_client);
 	}
 	return 0;
diff -Naur ivtv-0.3.9/driver/tda9887.c ivtv-0.3.9-philip/driver/tda9887.c
--- ivtv-0.3.9/driver/tda9887.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/tda9887.c	2005-09-14 16:37:44.510681891 -0500
@@ -664,9 +664,15 @@
 		return i2c_probe(adap, &addr_data, tda9887_attach);
 #else
 	switch (adap->id) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	case I2C_ALGO_BIT | I2C_HW_B_BT848:
 	case I2C_ALGO_BIT | I2C_HW_B_RIVA:
 	case I2C_ALGO_SAA7134:
+#else
+	case I2C_HW_B_BT848:
+	case I2C_HW_B_RIVA:
+	case I2C_ALGO_SAA7134:
+#endif
 		return i2c_probe(adap, &addr_data, tda9887_attach);
 		break;
 	}
@@ -851,7 +857,11 @@
 };
 static struct i2c_client client_template =
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	I2C_DEVNAME("tda9887"),
+#else
+	.name = "tda9887",
+#endif
 	.flags     = I2C_CLIENT_ALLOW_USE,
         .driver    = &driver,
 };
diff -Naur ivtv-0.3.9/driver/tuner.c ivtv-0.3.9-philip/driver/tuner.c
--- ivtv-0.3.9/driver/tuner.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/tuner.c	2005-09-14 16:38:05.359017086 -0500
@@ -1648,11 +1648,19 @@
 		return i2c_probe(adap, &addr_data, tuner_attach);
 #else
 	switch (adap->id) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	case I2C_ALGO_BIT | I2C_HW_SMBUS_VOODOO3:
 	case I2C_ALGO_BIT | I2C_HW_B_BT848:
 	case I2C_ALGO_BIT | I2C_HW_B_RIVA:
 	case I2C_ALGO_SAA7134:
 	case I2C_ALGO_SAA7146:
+#else
+	case I2C_HW_SMBUS_VOODOO3:
+	case I2C_HW_B_BT848:
+	case I2C_HW_B_RIVA:
+	case I2C_ALGO_SAA7134:
+	case I2C_ALGO_SAA7146:
+#endif
 		return i2c_probe(adap, &addr_data, tuner_attach);
 		break;
 	}
@@ -1832,7 +1840,11 @@
 	.command = tuner_command,
 };
 static struct i2c_client client_template = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	I2C_DEVNAME("(tuner unset)"),
+#else
+	.name = "(tuner unset)",
+#endif
 	.flags = I2C_CLIENT_ALLOW_USE,
 	.driver = &driver,
 };
diff -Naur ivtv-0.3.9/driver/tveeprom.c ivtv-0.3.9-philip/driver/tveeprom.c
--- ivtv-0.3.9/driver/tveeprom.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/tveeprom.c	2005-09-14 15:35:05.183843772 -0500
@@ -753,7 +753,11 @@
 
 static int tveeprom_attach_adapter(struct i2c_adapter *adapter)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	if (adapter->id != (I2C_ALGO_BIT | I2C_HW_B_BT848))
+#else
+	if (adapter->id != I2C_HW_B_BT848)
+#endif
 		return 0;
 	dprintk(1, "starting probe for adapter %s (0x%x)\n",
 		adapter->name, adapter->id);
diff -Naur ivtv-0.3.9/driver/wm8775.c ivtv-0.3.9-philip/driver/wm8775.c
--- ivtv-0.3.9/driver/wm8775.c	2005-09-14 05:00:10.000000000 -0500
+++ ivtv-0.3.9-philip/driver/wm8775.c	2005-09-14 15:36:04.760975541 -0500
@@ -562,7 +562,11 @@
 
 static int attach_adapter(struct i2c_adapter *adapter)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
 	if (adapter->id == (I2C_ALGO_BIT | I2C_HW_B_BT848)) {
+#else
+	if (adapter->id == I2C_HW_B_BT848) {
+#endif
 		WM8775_DEBUG("starting probe for adapter %s (0x%x)\n",
 	    	adapter->name, adapter->id);
 		return i2c_probe(adapter, &addr_data, &detect_client);

Reply via email to