summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134
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 /linux/drivers/media/video/saa7134
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>
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c14
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c10
2 files changed, 20 insertions, 4 deletions
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;
}