summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tea6415c.c
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-04-24 12:57:17 +0000
committerMichael Hunold <devnull@localhost>2003-04-24 12:57:17 +0000
commit3e004ed242b3bb9cd7d41031c089c851021c7680 (patch)
tree66e5e643631d858b52ec1f2d2e6d7e25a1b4ab74 /linux/drivers/media/video/tea6415c.c
parentd768b768fbe2bc59f1f3335081fbe907dda9e036 (diff)
downloadmediapointer-dvb-s2-3e004ed242b3bb9cd7d41031c089c851021c7680.tar.gz
mediapointer-dvb-s2-3e004ed242b3bb9cd7d41031c089c851021c7680.tar.bz2
Some fixes to get the "analog" i2c drivers to work for both 2.4 and
2.5. Add the DVB_DEVFS_ONLY switch back again.
Diffstat (limited to 'linux/drivers/media/video/tea6415c.c')
-rw-r--r--linux/drivers/media/video/tea6415c.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index 7215c58f8..fe91e32cb 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -6,7 +6,7 @@
The tea6415c is a bus controlled video-matrix-switch
with 8 inputs and 6 outputs.
It is cascadable, i.e. it can be found at the addresses
- 0x86 and 0x06 on the i2c-bus.
+ 0x43 and 0x03 on the i2c-bus.
For detailed informations download the specifications directly
from SGS Thomson at http://www.st.com
@@ -70,9 +70,14 @@ static int tea6415c_detect(struct i2c_adapter *adapter, int address, unsigned sh
if (0 == client) {
return -ENOMEM;
}
+ memset(client, 0, sizeof(struct i2c_client));
/* fill client structure */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
sprintf(client->name,"tea6415c (0x%02x)", address);
+#else
+ sprintf(client->dev.name,"tea6415c (0x%02x)", address);
+#endif
client->id = tea6415c_id++;
client->flags = 0;
client->addr = address;
@@ -85,7 +90,11 @@ static int tea6415c_detect(struct i2c_adapter *adapter, int address, unsigned sh
return err;
}
- printk("tea6415c.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+ printk("tea6415c.o: detected @ 0x%02x on adapter %s\n",address,&client->adapter->name[0]);
+#else
+ printk("tea6415c.o: detected @ 0x%02x on adapter %s\n",address,&client->adapter->dev.name[0]);
+#endif
return 0;
}