summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-03-17 10:41:18 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-17 10:41:18 -0300
commit3d6627c897e23b798970ef02d1039ef7a29066a6 (patch)
treeef7d24365515660fb20cf11f535036e9e1aa2d14
parentf7bf0862d0d257ce9cea85fecfe8ca1de579a292 (diff)
downloadmediapointer-dvb-s2-3d6627c897e23b798970ef02d1039ef7a29066a6.tar.gz
mediapointer-dvb-s2-3d6627c897e23b798970ef02d1039ef7a29066a6.tar.bz2
cx88/saa7134: fix magic number for xc3028 reusage detection
From: Mauro Carvalho Chehab <mchehab@infradead.org> tuner-xc2028 needs to know when a DVB module is sharing the same analog tuner. This is done by comparing a magic number that needs to be the same on analog and on digital. To make easier, this magic number is a pointer to some data struct. With the previous code, two different pointers were using, causing a miss-detection. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-dvb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index 4cfff6e4a..71447830b 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -465,7 +465,7 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)
struct xc2028_config cfg = {
.i2c_adap = &dev->core->i2c_adap,
.i2c_addr = addr,
- .video_dev = dev->core,
+ .video_dev = dev->core->i2c_adap.algo_data,
};
if (!dev->dvb.frontend) {
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c
index 5768ec93d..f49631e12 100644
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1173,7 +1173,7 @@ static int dvb_init(struct saa7134_dev *dev)
struct xc2028_config cfg = {
.i2c_adap = &dev->i2c_adap,
.i2c_addr = 0x61,
- .video_dev = dev,
+ .video_dev = dev->i2c_adap.algo_data,
};
fe = dvb_attach(xc2028_attach, dev->dvb.frontend, &cfg);
if (!fe) {