diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 08:57:53 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-01 08:57:53 +0200 |
commit | f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838 (patch) | |
tree | 3e4f7547293379c0876008a04da98af9ba4f47aa /linux/drivers/media/video/cx88 | |
parent | 1784ea5527ed756f946958f45f74d1f15797c366 (diff) | |
download | mediapointer-dvb-s2-f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838.tar.gz mediapointer-dvb-s2-f0312f1d7b8dd5cde4035eef2a5b0fe7effdd838.tar.bz2 |
v4l2-common: add explicit v4l2_device pointer as first arg to new_(probed)_subdev
From: Hans Verkuil <hverkuil@xs4all.nl>
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.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 15 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 4 |
2 files changed, 11 insertions, 8 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 34327b62a..a4d49fbf7 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -3254,16 +3254,19 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr) The radio_type is sometimes missing, or set to UNSET but later code configures a tea5767. */ - v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", "tuner", + v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap, + "tuner", "tuner", v4l2_i2c_tuner_addrs(ADDRS_RADIO)); if (has_demod) - v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", - "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); + v4l2_i2c_new_probed_subdev(&core->v4l2_dev, + &core->i2c_adap, "tuner", "tuner", + v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); if (core->board.tuner_addr == ADDR_UNSET) { - v4l2_i2c_new_probed_subdev(&core->i2c_adap, "tuner", - "tuner", has_demod ? tv_addrs + 4 : tv_addrs); + v4l2_i2c_new_probed_subdev(&core->v4l2_dev, + &core->i2c_adap, "tuner", "tuner", + has_demod ? tv_addrs + 4 : tv_addrs); } else { - v4l2_i2c_new_subdev(&core->i2c_adap, + v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, "tuner", "tuner", core->board.tuner_addr); } } diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 7e642b6f3..8f0e1e616 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -2156,7 +2156,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, /* load and configure helper modules */ if (core->board.audio_chip == V4L2_IDENT_WM8775) - v4l2_i2c_new_subdev(&core->i2c_adap, + v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, "wm8775", "wm8775", 0x36 >> 1); if (core->board.audio_chip == V4L2_IDENT_TVAUDIO) { @@ -2166,7 +2166,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, 0xb0 >> 1, I2C_CLIENT_END }; - v4l2_i2c_new_probed_subdev(&core->i2c_adap, + v4l2_i2c_new_probed_subdev(&core->v4l2_dev, &core->i2c_adap, "tvaudio", "tvaudio", i2c_addr); } |