aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
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
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')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c20
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c6
2 files changed, 15 insertions, 11 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
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index ef15f1cb92e4..234f530f0d74 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -982,7 +982,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
982 /* load i2c helpers */ 982 /* load i2c helpers */
983 if (card_is_empress(dev)) { 983 if (card_is_empress(dev)) {
984 struct v4l2_subdev *sd = 984 struct v4l2_subdev *sd =
985 v4l2_i2c_new_subdev(&dev->i2c_adap, 985 v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
986 "saa6752hs", "saa6752hs", 986 "saa6752hs", "saa6752hs",
987 saa7134_boards[dev->board].empress_addr); 987 saa7134_boards[dev->board].empress_addr);
988 988
@@ -995,8 +995,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
995 struct v4l2_subdev *sd; 995 struct v4l2_subdev *sd;
996 996
997 addrs[0] = saa7134_boards[dev->board].rds_addr; 997 addrs[0] = saa7134_boards[dev->board].rds_addr;
998 sd = v4l2_i2c_new_probed_subdev(&dev->i2c_adap, "saa6588", 998 sd = v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap,
999 "saa6588", addrs); 999 "saa6588", "saa6588", addrs);
1000 if (sd) 1000 if (sd)
1001 printk(KERN_INFO "%s: found RDS decoder\n", dev->name); 1001 printk(KERN_INFO "%s: found RDS decoder\n", dev->name);
1002 } 1002 }