From 3e004ed242b3bb9cd7d41031c089c851021c7680 Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Thu, 24 Apr 2003 12:57:17 +0000 Subject: 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. --- linux/drivers/media/video/tea6415c.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video/tea6415c.c') 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; } -- cgit v1.2.3