diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 02:57:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:24 -0400 |
commit | e6574f2fbecdb8af807169d345c10131ae060a88 (patch) | |
tree | 9923d1065397b9796a476cac238bacbdf1d820d1 /drivers/media/video/cx23885 | |
parent | 868f985c2fb85b5f32785bb55a349d180a30f3d3 (diff) |
V4L/DVB (11373): v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
The functions v4l2_i2c_new_subdev and v4l2_i2c_new_probed_subdev relied on
i2c_get_adapdata to return the v4l2_device. However, this is not always
possible on embedded platforms. So modify the API to pass the v4l2_device
pointer explicitly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index fe8525517c4e..a3c0565be1a9 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -739,7 +739,8 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
739 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | 739 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
740 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: | 740 | case CX23885_BOARD_COMPRO_VIDEOMATE_E650F: |
741 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: | 741 | case CX23885_BOARD_NETUP_DUAL_DVBS2_CI: |
742 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->i2c_bus[2].i2c_adap, | 742 | dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
743 | &dev->i2c_bus[2].i2c_adap, | ||
743 | "cx25840", "cx25840", 0x88 >> 1); | 744 | "cx25840", "cx25840", 0x88 >> 1); |
744 | v4l2_subdev_call(dev->sd_cx25840, core, load_fw); | 745 | v4l2_subdev_call(dev->sd_cx25840, core, load_fw); |
745 | break; | 746 | break; |
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 41f0a2b11872..ce7b3f8cdc65 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -1523,10 +1523,12 @@ int cx23885_video_register(struct cx23885_dev *dev) | |||
1523 | struct v4l2_subdev *sd = NULL; | 1523 | struct v4l2_subdev *sd = NULL; |
1524 | 1524 | ||
1525 | if (dev->tuner_addr) | 1525 | if (dev->tuner_addr) |
1526 | sd = v4l2_i2c_new_subdev(&dev->i2c_bus[1].i2c_adap, | 1526 | sd = v4l2_i2c_new_subdev(&dev->v4l2_dev, |
1527 | &dev->i2c_bus[1].i2c_adap, | ||
1527 | "tuner", "tuner", dev->tuner_addr); | 1528 | "tuner", "tuner", dev->tuner_addr); |
1528 | else | 1529 | else |
1529 | sd = v4l2_i2c_new_probed_subdev(&dev->i2c_bus[1].i2c_adap, | 1530 | sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, |
1531 | &dev->i2c_bus[1].i2c_adap, | ||
1530 | "tuner", "tuner", v4l2_i2c_tuner_addrs(ADDRS_TV)); | 1532 | "tuner", "tuner", v4l2_i2c_tuner_addrs(ADDRS_TV)); |
1531 | if (sd) { | 1533 | if (sd) { |
1532 | struct tuner_setup tun_setup; | 1534 | struct tuner_setup tun_setup; |