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/cx88 | |
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/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 15 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 4 |
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 84ecfb291276..6bbbfc66bb4b 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -3221,16 +3221,19 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) | |||
3221 | The radio_type is sometimes missing, or set to UNSET but | 3221 | The radio_type is sometimes missing, or set to UNSET but |
3222 | later code configures a tea5767. | 3222 | later code configures a tea5767. |
3223 | */ | 3223 | */ |
3224 | v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", "tuner", | 3224 | v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap, |
3225 | "tuner", "tuner", | ||
3225 | v4l2_i2c_tuner_addrs(ADDRS_RADIO)); | 3226 | v4l2_i2c_tuner_addrs(ADDRS_RADIO)); |
3226 | if (has_demod) | 3227 | if (has_demod) |
3227 | v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", | 3228 | v4l2_i2c_new_probed_subdev(&core->v4l2_dev, |
3228 | "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | 3229 | &core->i2c_adap, "tuner", "tuner", |
3230 | v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); | ||
3229 | if (core->board.tuner_addr == ADDR_UNSET) { | 3231 | if (core->board.tuner_addr == ADDR_UNSET) { |
3230 | v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", | 3232 | v4l2_i2c_new_probed_subdev(&core->v4l2_dev, |
3231 | "tuner", has_demod ? tv_addrs + 4 : tv_addrs); | 3233 | &core->i2c_adap, "tuner", "tuner", |
3234 | has_demod ? tv_addrs + 4 : tv_addrs); | ||
3232 | } else { | 3235 | } else { |
3233 | v4l2_i2c_new_subdev(&core->i2c_adap, | 3236 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, |
3234 | "tuner", "tuner", core->board.tuner_addr); | 3237 | "tuner", "tuner", core->board.tuner_addr); |
3235 | } | 3238 | } |
3236 | } | 3239 | } |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index fb0764af6c77..d7d4d2a6ed9d 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1882,7 +1882,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1882 | /* load and configure helper modules */ | 1882 | /* load and configure helper modules */ |
1883 | 1883 | ||
1884 | if (core->board.audio_chip == V4L2_IDENT_WM8775) | 1884 | if (core->board.audio_chip == V4L2_IDENT_WM8775) |
1885 | v4l2_i2c_new_subdev(&core->i2c_adap, | 1885 | v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, |
1886 | "wm8775", "wm8775", 0x36 >> 1); | 1886 | "wm8775", "wm8775", 0x36 >> 1); |
1887 | 1887 | ||
1888 | if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { | 1888 | if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { |
@@ -1892,7 +1892,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, | |||
1892 | 0xb0 >> 1, I2C_CLIENT_END | 1892 | 0xb0 >> 1, I2C_CLIENT_END |
1893 | }; | 1893 | }; |
1894 | 1894 | ||
1895 | v4l2_i2c_new_probed_subdev(&core->i2c_adap, | 1895 | v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap, |
1896 | "tvaudio", "tvaudio", i2c_addr); | 1896 | "tvaudio", "tvaudio", i2c_addr); |
1897 | } | 1897 | } |
1898 | 1898 | ||