summaryrefslogtreecommitdiff
path: root/drivers/media/video/cx23885/cx23885-video.c
diff options
context:
space:
mode:
authorIgor M. Liplianin <liplianin@me.by>2011-01-25 17:05:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 20:32:18 -0300
commit557f48d5720b45dae07788bc9976762c363b8ad0 (patch)
treeded89ce2854e7c9d88e88f35c85465abdb0a48c3 /drivers/media/video/cx23885/cx23885-video.c
parent78db854757aa4110f9c6873d1529b851037a3405 (diff)
[media] cx23885: implement tuner_bus parameter for cx23885_board structure
There is two external I2C buses in cx23885 chip. Currently, analog tuners supported for second I2C bus only In NetUP Dual DVB-T/C CI RF card tuners connected to first bus So, in order to support analog tuners sitting on first bus we need modifications. Signed-off-by: Igor M. Liplianin <liplianin@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-video.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index 644fcb808c0b..ee57f6bedbe3 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -1468,16 +1468,17 @@ int cx23885_video_register(struct cx23885_dev *dev)
cx23885_irq_add_enable(dev, 0x01);
- if (TUNER_ABSENT != dev->tuner_type) {
+ if ((TUNER_ABSENT != dev->tuner_type) &&
+ ((dev->tuner_bus == 0) || (dev->tuner_bus == 1))) {
struct v4l2_subdev *sd = NULL;
if (dev->tuner_addr)
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
- &dev->i2c_bus[1].i2c_adap,
+ &dev->i2c_bus[dev->tuner_bus].i2c_adap,
"tuner", dev->tuner_addr, NULL);
else
sd = v4l2_i2c_new_subdev(&dev->v4l2_dev,
- &dev->i2c_bus[1].i2c_adap,
+ &dev->i2c_bus[dev->tuner_bus].i2c_adap,
"tuner", 0, v4l2_i2c_tuner_addrs(ADDRS_TV));
if (sd) {
struct tuner_setup tun_setup;