diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-13 07:02:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:48 -0400 |
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 bb7f71a1fcbe..969b7ebbc827 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, | |||
270 | 270 | ||
271 | static int attach_inform(struct i2c_client *client) | 271 | static int attach_inform(struct i2c_client *client) |
272 | { | 272 | { |
273 | struct cx23885_i2c *bus = i2c_get_adapdata(client->adapter); | 273 | struct v4l2_device *v4l2_dev = i2c_get_adapdata(client->adapter); |
274 | struct cx23885_dev *dev = bus->dev; | 274 | struct cx23885_dev *dev = to_cx23885(v4l2_dev); |
275 | struct tuner_setup tun_setup; | 275 | struct tuner_setup tun_setup; |
276 | 276 | ||
277 | dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", | 277 | dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", |
@@ -310,7 +310,8 @@ static int attach_inform(struct i2c_client *client) | |||
310 | 310 | ||
311 | static int detach_inform(struct i2c_client *client) | 311 | static int detach_inform(struct i2c_client *client) |
312 | { | 312 | { |
313 | struct cx23885_dev *dev = i2c_get_adapdata(client->adapter); | 313 | struct v4l2_device *v4l2_dev = i2c_get_adapdata(client->adapter); |
314 | struct cx23885_dev *dev = to_cx23885(v4l2_dev); | ||
314 | 315 | ||
315 | dprintk(1, "i2c detach [client=%s]\n", client->name); | 316 | dprintk(1, "i2c detach [client=%s]\n", client->name); |
316 | 317 | ||
@@ -402,7 +403,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus) | |||
402 | 403 | ||
403 | bus->i2c_algo.data = bus; | 404 | bus->i2c_algo.data = bus; |
404 | bus->i2c_adap.algo_data = bus; | 405 | bus->i2c_adap.algo_data = bus; |
405 | i2c_set_adapdata(&bus->i2c_adap, bus); | 406 | i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev); |
406 | i2c_add_adapter(&bus->i2c_adap); | 407 | i2c_add_adapter(&bus->i2c_adap); |
407 | 408 | ||
408 | bus->i2c_client.adapter = &bus->i2c_adap; | 409 | bus->i2c_client.adapter = &bus->i2c_adap; |