Commit 50407f99 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (7375): cx88/saa7134: fix magic number for xc3028 reusage detection

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: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent a920e42f
...@@ -458,7 +458,7 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev) ...@@ -458,7 +458,7 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)
struct xc2028_config cfg = { struct xc2028_config cfg = {
.i2c_adap = &dev->core->i2c_adap, .i2c_adap = &dev->core->i2c_adap,
.i2c_addr = addr, .i2c_addr = addr,
.video_dev = dev->core, .video_dev = dev->core->i2c_adap.algo_data,
}; };
if (!dev->dvb.frontend) { if (!dev->dvb.frontend) {
......
...@@ -1166,7 +1166,7 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1166,7 +1166,7 @@ static int dvb_init(struct saa7134_dev *dev)
struct xc2028_config cfg = { struct xc2028_config cfg = {
.i2c_adap = &dev->i2c_adap, .i2c_adap = &dev->i2c_adap,
.i2c_addr = 0x61, .i2c_addr = 0x61,
.video_dev = dev, .video_dev = dev->i2c_adap.algo_data,
}; };
fe = dvb_attach(xc2028_attach, dev->dvb.frontend, &cfg); fe = dvb_attach(xc2028_attach, dev->dvb.frontend, &cfg);
if (!fe) { if (!fe) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment