diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 12:02:43 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 12:02:43 +0100 |
commit | 611e15a080c06e90f91feee1be742463a0e256d6 (patch) | |
tree | c719fb2469d5c671d01d7931dab0d67a4f1a2c72 /linux/drivers/media/video/cx23885/cx23885-i2c.c | |
parent | 69357393e580dbcd400c7c1992b48813359eb417 (diff) | |
download | mediapointer-dvb-s2-611e15a080c06e90f91feee1be742463a0e256d6.tar.gz mediapointer-dvb-s2-611e15a080c06e90f91feee1be742463a0e256d6.tar.bz2 |
cx23885: convert to v4l2_device.
From: Hans Verkuil <hverkuil@xs4all.nl>
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/cx23885/cx23885-i2c.c')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-i2c.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-i2c.c b/linux/drivers/media/video/cx23885/cx23885-i2c.c index 2210b47d2..86493da33 100644 --- a/linux/drivers/media/video/cx23885/cx23885-i2c.c +++ b/linux/drivers/media/video/cx23885/cx23885-i2c.c @@ -271,8 +271,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", @@ -329,7 +329,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); @@ -424,7 +425,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; |