summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_i2c.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-07 07:38:12 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:41 -0300
commit45d809431daaa3ab01f877388d09676d05b469be (patch)
tree653bdabe7447cc2cde26bf672bff66c122c2da86 /drivers/media/common/saa7146_i2c.c
parentef77a26be1883366bb78741d1808e5c86a14ec76 (diff)
downloadlinux-45d809431daaa3ab01f877388d09676d05b469be.tar.gz
linux-45d809431daaa3ab01f877388d09676d05b469be.tar.bz2
linux-45d809431daaa3ab01f877388d09676d05b469be.zip
V4L/DVB (10497): saa7146: i2c adapdata now points to v4l2_device.
Prepare for converting to v4l2_subdev. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/saa7146_i2c.c')
-rw-r--r--drivers/media/common/saa7146_i2c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c
index c11da4d09cd0..1b64074a92da 100644
--- a/drivers/media/common/saa7146_i2c.c
+++ b/drivers/media/common/saa7146_i2c.c
@@ -390,7 +390,8 @@ out:
/* utility functions */
static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num)
{
- struct saa7146_dev* dev = i2c_get_adapdata(adapter);
+ struct v4l2_device *v4l2_dev = i2c_get_adapdata(adapter);
+ struct saa7146_dev *dev = to_saa7146_dev(v4l2_dev);
/* use helper function to transfer data */
return saa7146_i2c_transfer(dev, msg, num, adapter->retries);
@@ -419,7 +420,7 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
if( NULL != i2c_adapter ) {
BUG_ON(!i2c_adapter->class);
- i2c_set_adapdata(i2c_adapter,dev);
+ i2c_set_adapdata(i2c_adapter, &dev->v4l2_dev);
i2c_adapter->dev.parent = &dev->pci->dev;
i2c_adapter->algo = &saa7146_algo;
i2c_adapter->algo_data = NULL;