summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2006-01-07 20:43:22 +0000
committerMauro Carvalho Chehab <devnull@localhost>2006-01-07 20:43:22 +0000
commit891b1a330d34434953b744f5b470acf01cbcd1df (patch)
treea4deac413d4896ae8c4372d2c068d3f6a50a807e
parenta107ffe65b37a2bb7dfad1822910d281b18a2da9 (diff)
downloadmediapointer-dvb-s2-891b1a330d34434953b744f5b470acf01cbcd1df.tar.gz
mediapointer-dvb-s2-891b1a330d34434953b744f5b470acf01cbcd1df.tar.bz2
Some cleanups at I2C modules
- Latest patch reverted, since __stringfy seems to be needed for kernel < 2.6.15 - Applied kernel I2C cleanups from Jean Delaware. - driver names simplified to allow usage of newer printk macros at v4l2-common.h Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.h2
-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
-rw-r--r--linux/include/linux/i2c-id.h20
-rw-r--r--linux/include/media/saa7146.h6
-rw-r--r--v4l/ChangeLog37
27 files changed, 275 insertions, 65 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 39b90a055..47b21f54d 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -61,7 +61,7 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
#define dprintk(level, args...) \
do { \
if ((debug & level)) { \
- printk("%s: %s(): ", KBUILD_MODNAME, \
+ printk("%s: %s(): ", __stringify(KBUILD_MODNAME), \
__FUNCTION__); \
printk(args); } \
} while (0)
diff --git a/linux/drivers/media/dvb/ttpci/budget.h b/linux/drivers/media/dvb/ttpci/budget.h
index c8d48cfba..fdaa3318a 100644
--- a/linux/drivers/media/dvb/ttpci/budget.h
+++ b/linux/drivers/media/dvb/ttpci/budget.h
@@ -19,7 +19,7 @@ extern int budget_debug;
#endif
#define dprintk(level,args...) \
- do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __FUNCTION__); printk(args); } } while (0)
+ do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __FUNCTION__); printk(args); } } while (0)
struct budget_info {
char *name;
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,
diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h
index 6ff2d3658..c4564a283 100644
--- a/linux/include/linux/i2c-id.h
+++ b/linux/include/linux/i2c-id.h
@@ -25,6 +25,12 @@
/*
* ---- Driver types -----------------------------------------------------
+ * device id name + number function description, i2c address(es)
+ *
+ * Range 1000-1999 range is defined in sensors/sensors.h
+ * Range 0x100 - 0x1ff is for V4L2 Common Components
+ * Range 0xf000 - 0xffff is reserved for local experimentation, and should
+ * never be used in official drivers
*/
#define I2C_DRIVERID_MSP3400 1
@@ -105,7 +111,13 @@
#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */
+#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
+#define I2C_DRIVERID_EXP1 0xF1
+#define I2C_DRIVERID_EXP2 0xF2
+#define I2C_DRIVERID_EXP3 0xF3
+
#define I2C_DRIVERID_I2CDEV 900
+#define I2C_DRIVERID_I2CPROC 901
#define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */
#define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */
@@ -120,12 +132,15 @@
#define I2C_DRIVERID_ADM1021 1008
#define I2C_DRIVERID_ADM9240 1009
#define I2C_DRIVERID_LTC1710 1010
+#define I2C_DRIVERID_SIS5595 1011
#define I2C_DRIVERID_ICSPLL 1012
#define I2C_DRIVERID_BT869 1013
#define I2C_DRIVERID_MAXILIFE 1014
#define I2C_DRIVERID_MATORB 1015
#define I2C_DRIVERID_GL520 1016
#define I2C_DRIVERID_THMC50 1017
+#define I2C_DRIVERID_DDCMON 1018
+#define I2C_DRIVERID_VIA686A 1019
#define I2C_DRIVERID_ADM1025 1020
#define I2C_DRIVERID_LM87 1021
#define I2C_DRIVERID_PCF8574 1022
@@ -137,16 +152,21 @@
#define I2C_DRIVERID_FSCPOS 1028
#define I2C_DRIVERID_FSCSCY 1029
#define I2C_DRIVERID_PCF8591 1030
+#define I2C_DRIVERID_SMSC47M1 1031
+#define I2C_DRIVERID_VT1211 1032
#define I2C_DRIVERID_LM92 1033
+#define I2C_DRIVERID_VT8231 1034
#define I2C_DRIVERID_SMARTBATT 1035
#define I2C_DRIVERID_BMCSENSORS 1036
#define I2C_DRIVERID_FS451 1037
+#define I2C_DRIVERID_W83627HF 1038
#define I2C_DRIVERID_LM85 1039
#define I2C_DRIVERID_LM83 1040
#define I2C_DRIVERID_LM90 1042
#define I2C_DRIVERID_ASB100 1043
#define I2C_DRIVERID_FSCHER 1046
#define I2C_DRIVERID_W83L785TS 1047
+#define I2C_DRIVERID_SMSC47B397 1050
/*
* ---- Adapter types ----------------------------------------------------
diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h
index 2bc634fcb..e5be2b9b8 100644
--- a/linux/include/media/saa7146.h
+++ b/linux/include/media/saa7146.h
@@ -21,14 +21,14 @@
extern unsigned int saa7146_debug;
-//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),KBUILD_MODNAME,__FUNCTION__)
+//#define DEBUG_PROLOG printk("(0x%08x)(0x%08x) %s: %s(): ",(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,RPS_ADDR0))),(dev==0?-1:(dev->mem==0?-1:saa7146_read(dev,IER))),__stringify(KBUILD_MODNAME),__FUNCTION__)
#ifndef DEBUG_VARIABLE
#define DEBUG_VARIABLE saa7146_debug
#endif
-#define DEBUG_PROLOG printk("%s: %s(): ",KBUILD_MODNAME,__FUNCTION__)
-#define INFO(x) { printk("%s: ",KBUILD_MODNAME); printk x; }
+#define DEBUG_PROLOG printk("%s: %s(): ",__stringify(KBUILD_MODNAME),__FUNCTION__)
+#define INFO(x) { printk("%s: ",__stringify(KBUILD_MODNAME)); printk x; }
#define ERR(x) { DEBUG_PROLOG; printk x; }
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index d1a89c1f2..1401ee1b3 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,40 @@
+2006-01-07 20:12 mchehab
+
+ * linux/drivers/media/dvb/cinergyT2/cinergyT2.c:
+ * linux/drivers/media/dvb/ttpci/budget.h:
+ * linux/drivers/media/video/bt832.c:
+ * linux/drivers/media/video/bttv-i2c.c: (attach_inform):
+ * linux/drivers/media/video/cs53l32a.c: (cs53l32a_attach):
+ * linux/drivers/media/video/cx25840/cx25840-core.c:
+ (cx25840_detect_client):
+ * linux/drivers/media/video/cx25840/cx25840.h:
+ * linux/drivers/media/video/cx88/Kconfig:
+ * linux/drivers/media/video/cx88/cx88-i2c.c: (attach_inform):
+ * linux/drivers/media/video/em28xx/em28xx-i2c.c:
+ * linux/drivers/media/video/ir-kbd-i2c.c:
+ * linux/drivers/media/video/msp3400-driver.c:
+ * linux/drivers/media/video/saa6588.c:
+ * linux/drivers/media/video/saa7115.c: (saa7115_attach):
+ * linux/drivers/media/video/saa711x.c: (saa711x_detect_client):
+ * linux/drivers/media/video/saa7127.c: (saa7127_attach):
+ * linux/drivers/media/video/saa7134/saa6752hs.c:
+ * linux/drivers/media/video/saa7134/saa7134-i2c.c: (attach_inform):
+ * linux/drivers/media/video/tda7432.c:
+ * linux/drivers/media/video/tda9875.c:
+ * linux/drivers/media/video/tda9887.c:
+ * linux/drivers/media/video/tuner-core.c: (set_type):
+ * linux/drivers/media/video/tvaudio.c:
+ * linux/drivers/media/video/tveeprom.c: (tveeprom_detect_client):
+ * linux/include/linux/i2c-id.h:
+ * linux/include/media/saa7146.h:
+ - Latest patch reverted, since __stringfy seems to be needed for
+ kernel < 2.6.15
+ - Applied kernel I2C cleanups from Jean Delaware.
+ - driver names simplified to allow usage of newer printk macros
+ at v4l2-common.h
+
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2006-01-07 17:17 mchehab
* linux/drivers/media/dvb/cinergyT2/cinergyT2.c: