diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-22 18:06:44 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-22 18:06:44 -0200 |
commit | fceb8e0cafa24afb15f841c14fbe802e42c13dfe (patch) | |
tree | 7645da02cedb035f5f3b4883f59b529524070a32 /linux/drivers/media/video/saa7134/saa7134-i2c.c | |
parent | 8c0898eba0b293726f0d339021c14fcbcb7157af (diff) | |
parent | 8e61aa005719a9c2c7a8a1b8d0f99da2706b4030 (diff) | |
download | mediapointer-dvb-s2-fceb8e0cafa24afb15f841c14fbe802e42c13dfe.tar.gz mediapointer-dvb-s2-fceb8e0cafa24afb15f841c14fbe802e42c13dfe.tar.bz2 |
merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-saa7146-2
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-i2c.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-i2c.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index 3f7d4eb80..4b4d5ef76 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -332,8 +332,6 @@ static int attach_inform(struct i2c_client *client) d1printk( "%s i2c attach [addr=0x%x,client=%s]\n", client->driver->driver.name, client->addr, client->name); - if (client->addr == 0x20 && client->driver && client->driver->command) - dev->mpeg_i2c_client = client; /* Am I an i2c remote control? */ @@ -365,7 +363,9 @@ static struct i2c_algorithm saa7134_algo = { static struct i2c_adapter saa7134_adap_template = { .owner = THIS_MODULE, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) .class = I2C_CLASS_TV_ANALOG, +#endif .name = "saa7134", .id = I2C_HW_SAA7134, .algo = &saa7134_algo, @@ -429,29 +429,13 @@ static void do_i2c_scan(char *name, struct i2c_client *c) } } -void saa7134_i2c_call_clients(struct saa7134_dev *dev, - unsigned int cmd, void *arg) -{ - BUG_ON(NULL == dev->i2c_adap.algo_data); - i2c_clients_command(&dev->i2c_adap, cmd, arg); -} - -int saa7134_i2c_call_saa6752(struct saa7134_dev *dev, - unsigned int cmd, void *arg) -{ - if (dev->mpeg_i2c_client == NULL) - return -EINVAL; - return dev->mpeg_i2c_client->driver->command(dev->mpeg_i2c_client, - cmd, arg); -} -EXPORT_SYMBOL_GPL(saa7134_i2c_call_saa6752); - int saa7134_i2c_register(struct saa7134_dev *dev) { dev->i2c_adap = saa7134_adap_template; dev->i2c_adap.dev.parent = &dev->pci->dev; strcpy(dev->i2c_adap.name,dev->name); dev->i2c_adap.algo_data = dev; + i2c_set_adapdata(&dev->i2c_adap, &dev->v4l2_dev); i2c_add_adapter(&dev->i2c_adap); dev->i2c_client = saa7134_client_template; |