V4L/DVB (7375): cx88/saa7134: fix magic number for xc3028 reusage detection
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 22 Apr 2008 17:46:02 +0000 (14:46 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:07:51 +0000 (14:07 -0300)
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>
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/saa7134/saa7134-dvb.c

index d72b817bf886ab13b8f74e00fb67dfca5586562f..37ebfcc6be55df3016fcc3fe7a6a3df6647bd69c 100644 (file)
@@ -458,7 +458,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) {
index 97d9178dca2befb27605c6fb8e3cf5536c38737e..00f325ad565af93c8d01d4cba8c95e703db5ae12 100644 (file)
@@ -1166,7 +1166,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) {