summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/bt832.c14
-rw-r--r--linux/drivers/media/video/bttv-i2c.c6
-rw-r--r--linux/drivers/media/video/cs53l32a.c16
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c18
-rw-r--r--linux/drivers/media/video/cx25840/cx25840.h1
-rw-r--r--linux/drivers/media/video/cx88/Kconfig15
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c6
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-i2c.c2
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c15
-rw-r--r--linux/drivers/media/video/msp3400-driver.c12
-rw-r--r--linux/drivers/media/video/saa6588.c14
-rw-r--r--linux/drivers/media/video/saa7115.c16
-rw-r--r--linux/drivers/media/video/saa711x.c14
-rw-r--r--linux/drivers/media/video/saa7127.c16
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c14
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c10
-rw-r--r--linux/drivers/media/video/tda7432.c12
-rw-r--r--linux/drivers/media/video/tda9875.c10
-rw-r--r--linux/drivers/media/video/tda9887.c15
-rw-r--r--linux/drivers/media/video/tuner-core.c21
-rw-r--r--linux/drivers/media/video/tvaudio.c14
-rw-r--r--linux/drivers/media/video/tveeprom.c12
22 files changed, 213 insertions, 60 deletions
diff --git a/linux/drivers/media/video/bt832.c b/linux/drivers/media/video/bt832.c
index 30c0d3211..eec3cbfae 100644
--- a/linux/drivers/media/video/bt832.c
+++ b/linux/drivers/media/video/bt832.c
@@ -259,12 +259,18 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
- .name = "i2c bt832 driver",
- .id = -1, /* FIXME */
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .name = "bt832",
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "bt832",
+ },
+#endif
+ .id = 0, /* FIXME */
.attach_adapter = bt832_probe,
.detach_client = bt832_detach,
.command = bt832_command,
@@ -272,7 +278,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "bt832",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index e03d2ce52..cffc34c34 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-i2c.c,v 1.38 2006/01/01 17:17:38 mchehab Exp $
+ $Id: bttv-i2c.c,v 1.39 2006/01/07 20:43:23 mchehab Exp $
bttv-i2c.c -- all the i2c code is here
@@ -308,7 +308,11 @@ static int attach_inform(struct i2c_client *client)
if (bttv_debug)
printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
btv->c.nr,client->driver->name,client->addr,
+#else
+ btv->c.nr, client->driver->driver.name, client->addr,
+#endif
client->name);
if (!client->driver->command)
return 0;
diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c
index 7af5edc33..6da92d024 100644
--- a/linux/drivers/media/video/cs53l32a.c
+++ b/linux/drivers/media/video/cs53l32a.c
@@ -166,7 +166,9 @@ static int cs53l32a_attach(struct i2c_adapter *adapter, int address,
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
snprintf(client->name, sizeof(client->name) - 1, "cs53l32a");
v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name);
@@ -234,15 +236,21 @@ static int cs53l32a_detach(struct i2c_client *client)
/* i2c implementation */
static struct i2c_driver i2c_driver = {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+ .owner = THIS_MODULE,
+#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "cs53l32a",
- .id = I2C_DRIVERID_CS53L32A,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "cs53l32a",
+ },
+#endif
+ .id = I2C_DRIVERID_CS53L32A,
.attach_adapter = cs53l32a_probe,
.detach_client = cs53l32a_detach,
.command = cs53l32a_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- .owner = THIS_MODULE,
-#endif
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index feb06c993..d6b13d883 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -888,7 +888,9 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address,
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver_cx25840;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
snprintf(client->name, sizeof(client->name) - 1, "cx25840");
v4l_dbg(1, client, "detecting cx25840 client on address 0x%x\n", address << 1);
@@ -965,17 +967,21 @@ static int cx25840_detach_client(struct i2c_client *client)
/* ----------------------------------------------------------------------- */
static struct i2c_driver i2c_driver_cx25840 = {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+ .owner = THIS_MODULE,
+#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "cx25840",
-
- .id = I2C_DRIVERID_CX25840,
.flags = I2C_DF_NOTIFY,
-
+#else
+ .driver = {
+ .name = "cx25840",
+ },
+#endif
+ .id = I2C_DRIVERID_CX25840,
.attach_adapter = cx25840_attach_adapter,
.detach_client = cx25840_detach_client,
.command = cx25840_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- .owner = THIS_MODULE,
-#endif
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
diff --git a/linux/drivers/media/video/cx25840/cx25840.h b/linux/drivers/media/video/cx25840/cx25840.h
index 9192eb7a6..1cc52be79 100644
--- a/linux/drivers/media/video/cx25840/cx25840.h
+++ b/linux/drivers/media/video/cx25840/cx25840.h
@@ -22,6 +22,7 @@
#include "compat.h"
+
#include <linux/videodev2.h>
#include <linux/i2c.h>
diff --git a/linux/drivers/media/video/cx88/Kconfig b/linux/drivers/media/video/cx88/Kconfig
index 6c9cca69c..136c49c3c 100644
--- a/linux/drivers/media/video/cx88/Kconfig
+++ b/linux/drivers/media/video/cx88/Kconfig
@@ -44,6 +44,21 @@ config VIDEO_CX88_ALSA
To compile this driver as a module, choose M here: the
module will be called saa7134-alsa.
+config VIDEO_CX88_ALSA
+ tristate "ALSA DMA audio support"
+ depends on VIDEO_CX88_DVB && SND
+ select SND_PCM_OSS
+ ---help---
+ This is a video4linux driver for direct (DMA) audio on
+ Conexant 2388x based TV cards.
+ It only works with boards with function 01 enabled.
+ To check if your board supports, use lspci -n.
+ If supported, you should see 1471:8801 or 1471:8811
+ PCI device.
+
+ To compile this driver as a module, choose M here: the
+ module will be called saa7134-alsa.
+
config VIDEO_CX88_DVB_ALL_FRONTENDS
bool "Build all supported frontends for cx2388x based TV cards"
default y
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index f76bfb93a..fb39ce10a 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -1,5 +1,5 @@
/*
- $Id: cx88-i2c.c,v 1.38 2006/01/01 17:17:39 mchehab Exp $
+ $Id: cx88-i2c.c,v 1.39 2006/01/07 20:43:23 mchehab Exp $
cx88-i2c.c -- all the i2c code is here
@@ -100,7 +100,11 @@ static int attach_inform(struct i2c_client *client)
struct cx88_core *core = i2c_get_adapdata(client->adapter);
dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->driver->name, client->addr, client->name);
+#else
+ client->driver->driver.name, client->addr, client->name);
+#endif
if (!client->driver->command)
return 0;
diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c
index 3a7eba663..75f36e371 100644
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c
@@ -498,7 +498,9 @@ static struct i2c_adapter em28xx_adap_template = {
static struct i2c_client em28xx_client_template = {
.name = "em28xx internal",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
};
/* ----------------------------------------------------------- */
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index 01b4f3f11..86965c710 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-kbd-i2c.c,v 1.30 2005/12/08 21:02:56 mchehab Exp $
+ * $Id: ir-kbd-i2c.c,v 1.31 2006/01/07 20:43:23 mchehab Exp $
*
* keyboard input driver for i2c IR remote controls
*
@@ -280,9 +280,18 @@ static int ir_detach(struct i2c_client *client);
static int ir_probe(struct i2c_adapter *adap);
static struct i2c_driver driver = {
- .name = "ir remote kbd driver",
- .id = I2C_DRIVERID_INFRARED,
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+ .owner = THIS_MODULE;
+#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .name = "ir-kbd-i2c",
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "ir-kbd-i2c",
+ },
+#endif
+ .id = I2C_DRIVERID_INFRARED,
.attach_adapter = ir_probe,
.detach_client = ir_detach,
};
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index b8118b9c2..ddd515b30 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -122,7 +122,6 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing");
/* Addresses to scan */
static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END };
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
@@ -1218,18 +1217,25 @@ static int msp_detach(struct i2c_client *client)
/* i2c implementation */
static struct i2c_driver i2c_driver = {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+ .owner = THIS_MODULE,
+#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "msp3400",
- .id = I2C_DRIVERID_MSP3400,
.flags = I2C_DF_NOTIFY,
+#endif
+ .id = I2C_DRIVERID_MSP3400,
.attach_adapter = msp_probe,
.detach_client = msp_detach,
.command = msp_command,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.driver = {
+#if LINUX_VERSION_CODE . KERNEL_VERSION(2,6,15)
+ .name = "msp3400",
+#endif
.suspend = msp_suspend,
.resume = msp_resume,
},
- .owner = THIS_MODULE,
#endif
};
diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c
index a775c89e0..294078e92 100644
--- a/linux/drivers/media/video/saa6588.c
+++ b/linux/drivers/media/video/saa6588.c
@@ -511,12 +511,18 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd,
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) && ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
- .name = "i2c saa6588 driver",
- .id = -1, /* FIXME */
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .name = "saa6588",
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "saa6588",
+ },
+#endif
+ .id = -1, /* FIXME */
.attach_adapter = saa6588_probe,
.detach_client = saa6588_detach,
.command = saa6588_command,
@@ -524,7 +530,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template = {
.name = "saa6588",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index 9808559e5..dee841962 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -1272,7 +1272,9 @@ static int saa7115_attach(struct i2c_adapter *adapter, int address, int kind)
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver_saa7115;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
snprintf(client->name, sizeof(client->name) - 1, "saa7115");
v4l_dbg(1, client, "detecting saa7115 client on address 0x%x\n", address << 1);
@@ -1362,15 +1364,21 @@ static int saa7115_detach(struct i2c_client *client)
/* i2c implementation */
static struct i2c_driver i2c_driver_saa7115 = {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+ .owner = THIS_MODULE,
+#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "saa7115",
- .id = I2C_DRIVERID_SAA711X,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "saa7115",
+ },
+#endif
+ .id = I2C_DRIVERID_SAA711X,
.attach_adapter = saa7115_probe,
.detach_client = saa7115_detach,
.command = saa7115_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- .owner = THIS_MODULE,
-#endif
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
diff --git a/linux/drivers/media/video/saa711x.c b/linux/drivers/media/video/saa711x.c
index a07bc3de3..02cfe9c3e 100644
--- a/linux/drivers/media/video/saa711x.c
+++ b/linux/drivers/media/video/saa711x.c
@@ -511,7 +511,9 @@ saa711x_detect_client (struct i2c_adapter *adapter,
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver_saa711x;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
client->id = saa711x_i2c_id++;
snprintf(I2C_NAME(client), sizeof(I2C_NAME(client)) - 1,
@@ -588,14 +590,18 @@ saa711x_detach_client (struct i2c_client *client)
/* ----------------------------------------------------------------------- */
static struct i2c_driver i2c_driver_saa711x = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "saa711x",
-
- .id = I2C_DRIVERID_SAA711X,
.flags = I2C_DF_NOTIFY,
-
+#else
+ .driver = {
+ .name = "saa711x",
+ },
+#endif
+ .id = I2C_DRIVERID_SAA711X,
.attach_adapter = saa711x_attach_adapter,
.detach_client = saa711x_detach_client,
.command = saa711x_command,
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index 094a2cb01..f79d1810a 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -714,7 +714,9 @@ static int saa7127_attach(struct i2c_adapter *adapter, int address, int kind)
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver_saa7127;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
snprintf(client->name, sizeof(client->name) - 1, "saa7127");
v4l_dbg(1, client, "detecting saa7127 client on address 0x%x\n", address << 1);
@@ -820,15 +822,21 @@ static int saa7127_detach(struct i2c_client *client)
/* ----------------------------------------------------------------------- */
static struct i2c_driver i2c_driver_saa7127 = {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
+ .owner = THIS_MODULE,
+#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "saa7127",
- .id = I2C_DRIVERID_SAA7127,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "saa7127",
+ },
+#endif
+ .id = I2C_DRIVERID_SAA7127,
.attach_adapter = saa7127_probe,
.detach_client = saa7127_detach,
.command = saa7127_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- .owner = THIS_MODULE,
-#endif
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index 028eb27b6..69e8c209c 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -619,12 +619,18 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
- .name = "i2c saa6752hs MPEG encoder",
- .id = I2C_DRIVERID_SAA6752HS,
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .name = "saa6752hs",
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "saa6752hs",
+ },
+#endif
+ .id = I2C_DRIVERID_SAA6752HS,
.attach_adapter = saa6752hs_probe,
.detach_client = saa6752hs_detach,
.command = saa6752hs_command,
@@ -633,7 +639,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "saa6752hs",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index 4163c493f..1f9b91b21 100644
--- a/linux/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-i2c.c,v 1.28 2006/01/01 17:17:39 mchehab Exp $
+ * $Id: saa7134-i2c.c,v 1.29 2006/01/07 20:43:23 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* i2c interface support
@@ -341,7 +341,11 @@ static int attach_inform(struct i2c_client *client)
struct tuner_setup tun_setup;
d1printk( "%s i2c attach [addr=0x%x,client=%s]\n",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->driver->name, client->addr, client->name);
+#else
+ client->driver->driver.name, client->addr, client->name);
+#endif
/* Am I an i2c remote control? */
@@ -351,7 +355,11 @@ static int attach_inform(struct i2c_client *client)
{
struct IR_i2c *ir = i2c_get_clientdata(client);
d1printk("%s i2c IR detected (%s).\n",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->driver->name,ir->phys);
+#else
+ client->driver->driver.name, ir->phys);
+#endif
saa7134_set_i2c_ir(dev,ir);
break;
}
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index c5b2fdfdf..7b68530b1 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -531,12 +531,18 @@ static int tda7432_command(struct i2c_client *client,
}
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
- .name = "i2c tda7432 driver",
- .id = I2C_DRIVERID_TDA7432,
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .name = "tda7432",
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "tda7432",
+ },
+#endif
+ .id = I2C_DRIVERID_TDA7432,
.attach_adapter = tda7432_probe,
.detach_client = tda7432_detach,
.command = tda7432_command,
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index ddaaa2917..95665fb44 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -402,12 +402,18 @@ static int tda9875_command(struct i2c_client *client,
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "i2c tda9875 driver",
- .id = I2C_DRIVERID_TDA9875,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "i2c tda9875 driver",
+ },
+#endif
+ .id = I2C_DRIVERID_TDA9875,
.attach_adapter = tda9875_probe,
.detach_client = tda9875_detach,
.command = tda9875_command,
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 5125ce1ad..ce31ad9fd 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -934,17 +934,22 @@ static int tda9887_resume(struct device * dev, u32 level)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
- .name = "i2c tda9887 driver",
- .id = -1, /* FIXME */
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
+ .name = "tda9887",
.flags = I2C_DF_NOTIFY,
+#endif
+ .id = -1, /* FIXME */
.attach_adapter = tda9887_probe,
.detach_client = tda9887_detach,
.command = tda9887_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
.driver = {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+ .name = "tda9887",
+#endif
.suspend = tda9887_suspend,
.resume = tda9887_resume,
},
@@ -953,7 +958,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "tda9887",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index cb9af7ab3..1062f770c 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.93 2006/01/02 22:31:44 hverkuil Exp $
+ * $Id: tuner-core.c,v 1.94 2006/01/07 20:43:23 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -238,7 +238,11 @@ static void set_type(struct i2c_client *c, unsigned int type,
set_freq(c, t->freq);
tuner_dbg("%s %s I2C addr 0x%02x with type %d used for 0x%02x\n",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
c->adapter->name, c->driver->name, c->addr << 1, type,
+#else
+ c->adapter->name, c->driver->driver.name, c->addr << 1, type,
+#endif
t->mode_mask);
}
@@ -857,20 +861,25 @@ static int tuner_resume(struct device *dev, u32 level)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "tuner",
- .id = I2C_DRIVERID_TUNER,
.flags = I2C_DF_NOTIFY,
+#endif
+ .id = I2C_DRIVERID_TUNER,
.attach_adapter = tuner_probe,
.detach_client = tuner_detach,
.command = tuner_command,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
.driver = {
- .suspend = tuner_suspend,
- .resume = tuner_resume,
- },
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+ .name = "tuner",
+#endif
+ .suspend = tuner_suspend,
+ .resume = tuner_resume,
+ },
#endif
};
static struct i2c_client client_template = {
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index ee868bb8a..2f7131d81 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -1785,14 +1785,20 @@ static int chip_command(struct i2c_client *client,
return 0;
}
-
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
+ static struct i2c_driver driver = {
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "tvaudio",
- .id = I2C_DRIVERID_TVAUDIO,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "tvaudio",
+ },
+#endif
+ .id = I2C_DRIVERID_TVAUDIO,
.attach_adapter = chip_probe,
.detach_client = chip_detach,
.command = chip_command,
@@ -1801,7 +1807,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "(unset)",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 28971b473..c855b0ba4 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -765,7 +765,9 @@ tveeprom_detect_client(struct i2c_adapter *adapter,
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver_tveeprom;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
snprintf(client->name, sizeof(client->name), "tveeprom");
i2c_attach_client(client);
@@ -796,12 +798,18 @@ tveeprom_detach_client (struct i2c_client *client)
}
static struct i2c_driver i2c_driver_tveeprom = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "tveeprom",
- .id = I2C_DRIVERID_TVEEPROM,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "tveeprom",
+ },
+#endif
+ .id = I2C_DRIVERID_TVEEPROM,
.attach_adapter = tveeprom_attach_adapter,
.detach_client = tveeprom_detach_client,
.command = tveeprom_command,