summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/dvb-core/Kconfig10
-rw-r--r--linux/drivers/media/video/saa7111.c29
-rw-r--r--linux/drivers/media/video/tda9840.c17
-rw-r--r--linux/drivers/media/video/tea6415c.c13
-rw-r--r--linux/drivers/media/video/tea6420.c13
5 files changed, 69 insertions, 13 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/Kconfig b/linux/drivers/media/dvb/dvb-core/Kconfig
index 99e2d6b9d..ea925e5c0 100644
--- a/linux/drivers/media/dvb/dvb-core/Kconfig
+++ b/linux/drivers/media/dvb/dvb-core/Kconfig
@@ -5,3 +5,13 @@ config DVB_CORE
DVB core utility functions for device handling, software fallbacks etc.
Say Y when you have a DVB card and want to use it. If unsure say N.
+
+config DVB_DEVFS_ONLY
+ bool "devfs only"
+ depends on DVB_CORE=y && DEVFS_FS
+ help
+ If you rely completly on devfs, you can drop support for the old
+ major/minor device scheme. This omits some really awkward lines of
+ code and saves some space in your kernel image.
+
+ But as always: If unsure say N.
diff --git a/linux/drivers/media/video/saa7111.c b/linux/drivers/media/video/saa7111.c
index 456e2fdf1..cac5ddd99 100644
--- a/linux/drivers/media/video/saa7111.c
+++ b/linux/drivers/media/video/saa7111.c
@@ -60,12 +60,10 @@ struct saa7111 {
static unsigned short normal_i2c[] = { 0x24, 0x25, I2C_CLIENT_END };
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-/* magic definition of all other variables and things */
I2C_CLIENT_INSMOD;
static struct i2c_client client_template;
/* ----------------------------------------------------------------------- */
-
static int saa7111_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind)
{
int i;
@@ -122,7 +120,6 @@ static int saa7111_attach(struct i2c_adapter *adap, int addr, unsigned short fla
}
memset(decoder, 0, sizeof(*decoder));
- strcpy(client->name, "saa7111");
decoder->client = client;
client->data = decoder;
decoder->addr = addr;
@@ -137,10 +134,18 @@ static int saa7111_attach(struct i2c_adapter *adap, int addr, unsigned short fla
i = i2c_master_send(client, init, sizeof(init));
if (i < 0) {
printk(KERN_ERR "%s_attach: init status %d\n",
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
client->name, i);
+#else
+ client->dev.name, i);
+#endif
} else {
printk(KERN_INFO "%s_attach: chip version %x @ 0x%08x\n",
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
client->name, i2c_smbus_read_byte_data(client, 0x00) >> 4,addr);
+#else
+ client->dev.name, i2c_smbus_read_byte_data(client, 0x00) >> 4,addr);
+#endif
}
init_MUTEX(&decoder->lock);
@@ -165,7 +170,11 @@ static int saa7111_probe(struct i2c_adapter *adap)
static int saa7111_detach(struct i2c_client *client)
{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
struct saa7111 *decoder = client->data;
+#else
+ struct saa7111 *decoder = i2c_get_clientdata(client);
+#endif
i2c_detach_client(client);
kfree(decoder);
kfree(client);
@@ -176,7 +185,11 @@ static int saa7111_detach(struct i2c_client *client)
static int saa7111_command(struct i2c_client *client, unsigned int cmd,
void *arg)
{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
struct saa7111 *decoder = client->data;
+#else
+ struct saa7111 *decoder = i2c_get_clientdata(client);
+#endif
switch (cmd) {
#if defined(DECODER_DUMP)
@@ -187,7 +200,11 @@ static int saa7111_command(struct i2c_client *client, unsigned int cmd,
for (i = 0; i < 32; i += 16) {
int j;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
printk("KERN_DEBUG %s: %03x", client->name,
+#else
+ printk("KERN_DEBUG %s: %03x", client->dev.name,
+#endif
i);
for (j = 0; j < 16; ++j) {
printk(" %02x",
@@ -408,7 +425,13 @@ static struct i2c_driver i2c_driver_saa7111 = {
};
static struct i2c_client client_template = {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
.name = "saa7111_client",
+#else
+ .dev = {
+ .name = "saa7111_client",
+ },
+#endif
.id = -1,
.driver = &i2c_driver_saa7111
};
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c
index 85295ac2d..b5030135a 100644
--- a/linux/drivers/media/video/tda9840.c
+++ b/linux/drivers/media/video/tda9840.c
@@ -4,7 +4,7 @@
Copyright (C) 1998-2003 Michael Hunold <michael@mihu.de>
The tda9840 is a stereo/dual sound processor with digital
- identification. It can be found at address 0x84 on the i2c-bus.
+ identification. It can be found at address 0x42 on the i2c-bus.
For detailed informations download the specifications directly
from SGS Thomson at http://www.st.com
@@ -196,15 +196,19 @@ static int tda9840_detect(struct i2c_adapter *adapter, int address, unsigned sho
printk("tda9840.o: not enough kernel memory.\n");
return -ENOMEM;
}
-
+ memset(client, 0, sizeof(struct i2c_client));
+
/* fill client structure */
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
sprintf(client->name,"tda9840 (0x%02x)", address);
+#else
+ sprintf(client->dev.name,"tda9840 (0x%02x)", address);
+#endif
client->id = tda9840_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 != (result = i2c_attach_client(client))) {
@@ -227,8 +231,11 @@ static int tda9840_detect(struct i2c_adapter *adapter, int address, unsigned sho
printk("tda9840.o: could not initialize ic #3. continuing anyway. (result:%d)\n",result);
}
- printk("tda9840.o: detected @ 0x%02x on adapter %s\n",2*address,&client->adapter->name[0]);
-
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+ printk("tda9840.o: detected @ 0x%02x on adapter %s\n",address,&client->adapter->name[0]);
+#else
+ printk("tda9840.o: detected @ 0x%02x on adapter %s\n",address,&client->adapter->dev.name[0]);
+#endif
return 0;
}
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;
}
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;
}