aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-cards.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-01 02:57:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:24 -0400
commite6574f2fbecdb8af807169d345c10131ae060a88 (patch)
tree9923d1065397b9796a476cac238bacbdf1d820d1 /drivers/media/video/saa7134/saa7134-cards.c
parent868f985c2fb85b5f32785bb55a349d180a30f3d3 (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/saa7134/saa7134-cards.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index a790a7246a63..e2ffc6756dcc 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -6599,20 +6599,24 @@ int saa7134_board_init2(struct saa7134_dev *dev)
6599 /* Note: radio tuner address is always filled in, 6599 /* Note: radio tuner address is always filled in,
6600 so we do not need to probe for a radio tuner device. */ 6600 so we do not need to probe for a radio tuner device. */
6601 if (dev->radio_type != UNSET) 6601 if (dev->radio_type != UNSET)
6602 v4l2_i2c_new_subdev(&dev->i2c_adap, 6602 v4l2_i2c_new_subdev(&dev->v4l2_dev,
6603 "tuner", "tuner", dev->radio_addr); 6603 &dev->i2c_adap, "tuner", "tuner",
6604 dev->radio_addr);
6604 if (has_demod) 6605 if (has_demod)
6605 v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "tuner", 6606 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
6606 "tuner", v4l2_i2c_tuner_addrs(ADDRS_DEMOD)); 6607 &dev->i2c_adap, "tuner", "tuner",
6608 v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
6607 if (dev->tuner_addr == ADDR_UNSET) { 6609 if (dev->tuner_addr == ADDR_UNSET) {
6608 enum v4l2_i2c_tuner_type type = 6610 enum v4l2_i2c_tuner_type type =
6609 has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV; 6611 has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
6610 6612
6611 v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "tuner", 6613 v4l2_i2c_new_probed_subdev(&dev->v4l2_dev,
6612 "tuner", v4l2_i2c_tuner_addrs(type)); 6614 &dev->i2c_adap, "tuner", "tuner",
6615 v4l2_i2c_tuner_addrs(type));
6613 } else { 6616 } else {
6614 v4l2_i2c_new_subdev(&dev->i2c_adap, 6617 v4l2_i2c_new_subdev(&dev->v4l2_dev,
6615 "tuner", "tuner", dev->tuner_addr); 6618 &dev->i2c_adap, "tuner", "tuner",
6619 dev->tuner_addr);
6616 } 6620 }
6617 } 6621 }
6618 6622