diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 08:02:43 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 12:43:48 -0300 |
commit | c0714f6cc6a7850062db41d5b2b8b90e5682ae41 (patch) | |
tree | 613844eec6820177fba20d290c99949878dbb219 /drivers/media/video/cx23885/cx23885-i2c.c | |
parent | 8bbd90ce80d39d372857235f00c7abb208bd9e4f (diff) |
V4L/DVB (11295): cx23885: convert to v4l2_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-i2c.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-i2c.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/cx23885/cx23885-i2c.c b/drivers/media/video/cx23885/cx23885-i2c.c index bb7f71a1fcb..969b7ebbc82 100644 --- a/drivers/media/video/cx23885/cx23885-i2c.c +++ b/drivers/media/video/cx23885/cx23885-i2c.c @@ -270,8 +270,8 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, static int attach_inform(struct i2c_client *client) { - struct cx23885_i2c *bus = i2c_get_adapdata(client->adapter); - struct cx23885_dev *dev = bus->dev; + struct v4l2_device *v4l2_dev = i2c_get_adapdata(client->adapter); + struct cx23885_dev *dev = to_cx23885(v4l2_dev); struct tuner_setup tun_setup; dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", @@ -310,7 +310,8 @@ static int attach_inform(struct i2c_client *client) static int detach_inform(struct i2c_client *client) { - struct cx23885_dev *dev = i2c_get_adapdata(client->adapter); + struct v4l2_device *v4l2_dev = i2c_get_adapdata(client->adapter); + struct cx23885_dev *dev = to_cx23885(v4l2_dev); dprintk(1, "i2c detach [client=%s]\n", client->name); @@ -402,7 +403,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus) bus->i2c_algo.data = bus; bus->i2c_adap.algo_data = bus; - i2c_set_adapdata(&bus->i2c_adap, bus); + i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev); i2c_add_adapter(&bus->i2c_adap); bus->i2c_client.adapter = &bus->i2c_adap; |