summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tea6420.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/tea6420.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/tea6420.c')
-rw-r--r--linux/drivers/media/video/tea6420.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c
index 63aa2caa9..aa0ef021e 100644
--- a/linux/drivers/media/video/tea6420.c
+++ b/linux/drivers/media/video/tea6420.c
@@ -110,15 +110,19 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, unsigned sho
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,"tea6420 (0x%02x)", address);
+#else
+ sprintf(client->dev.name,"tea6420 (0x%02x)", address);
+#endif
client->id = tea6420_id++;
client->flags = 0;
client->addr = address;
client->adapter = adapter;
client->driver = &driver;
- client->data = NULL;
/* tell the i2c layer a new client has arrived */
if (0 != (err = i2c_attach_client(client))) {
@@ -135,8 +139,11 @@ static int tea6420_detect(struct i2c_adapter *adapter, int address, unsigned sho
printk("tea6420.o: could not initialize chipset. continuing anyway.\n");
}
- printk("tea6420.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]);
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+ printk("tea6420.o: detected @ 0x%02x on adapter %s\n",address,&client->adapter->name[0]);
+#else
+ printk("tea6420.o: detected @ 0x%02x on adapter %s\n",address,&client->adapter->dev.name[0]);
+#endif
return 0;
}