summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_i2c.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-02-07 11:38:12 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-02-07 11:38:12 +0100
commit730fafde64c1efd147ec7f58edf1bc0cc24ef24b (patch)
tree419677d80eb12f1a44722df289399ade77efdc89 /linux/drivers/media/common/saa7146_i2c.c
parent03ba675c15fe86ace9d44dc86d769b6695621e69 (diff)
downloadmediapointer-dvb-s2-730fafde64c1efd147ec7f58edf1bc0cc24ef24b.tar.gz
mediapointer-dvb-s2-730fafde64c1efd147ec7f58edf1bc0cc24ef24b.tar.bz2
saa7146: i2c adapdata now points to v4l2_device.
From: Hans Verkuil <hverkuil@xs4all.nl> Prepare for converting to v4l2_subdev. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/common/saa7146_i2c.c')
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 255b14551..f275846da 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -391,7 +391,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);
@@ -423,7 +424,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;