summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cx23885/cx23885-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-29 09:20:15 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-06-17 12:04:49 -0300
commit8abe4a0a3f6d4217b16a1a3f68cd5c72ab5a058e (patch)
tree39c885e72ee0ad7600a160fdc8cd632769a7e5d2 /drivers/media/pci/cx23885/cx23885-dvb.c
parent7f67d96ab181aff4af2074ba0a56b3f81333e896 (diff)
[media] dib7000: export just one symbol
Exporting multiple symbols don't work as it causes compilation breakages, due to the way dvb_attach() works. This were reported several times, like: drivers/built-in.o: In function `cxusb_dualdig4_rev2_tuner_attach': >> cxusb.c:(.text+0x27d4b5): undefined reference to `dib7000p_get_i2c_master' drivers/built-in.o: In function `dib7070_set_param_override': cxusb.c:(.text+0x27d5a5): undefined reference to `dib0070_wbd_offset' >> cxusb.c:(.text+0x27d5be): undefined reference to `dib7000p_set_wbd_ref' drivers/built-in.o: In function `dib7070_tuner_reset': >> cxusb.c:(.text+0x27d5f9): undefined reference to `dib7000p_set_gpio' drivers/built-in.o: In function `cxusb_dualdig4_rev2_frontend_attach': >> cxusb.c:(.text+0x27df5c): undefined reference to `dib7000p_i2c_enumeration' In this specific report: CONFIG_DVB_USB_CXUSB=y CONFIG_DVB_DIB7000P=m But the same type of bug can happen if: CONFIG_DVB_DIB7000P=m and one of the bridge drivers is compiled builtin (cxusb, cx23885-dvb and/or dib0700). As a bonus, dib7000p won't be loaded anymore if the device uses a different frontend, reducing the memory footprint. Tested with Hauppauge Nova-TD (2 frontends). Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-dvb.c')
-rw-r--r--drivers/media/pci/cx23885/cx23885-dvb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 69e526391c12..d037459f3d14 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -748,6 +748,7 @@ static int netup_altera_fpga_rw(void *device, int flag, int data, int read)
static int dvb_register(struct cx23885_tsport *port)
{
+ struct dib7000p_ops dib7000p_ops;
struct cx23885_dev *dev = port->dev;
struct cx23885_i2c *i2c_bus = NULL, *i2c_bus2 = NULL;
struct videobuf_dvb_frontend *fe0, *fe1 = NULL;
@@ -925,8 +926,11 @@ static int dvb_register(struct cx23885_tsport *port)
break;
case CX23885_BOARD_HAUPPAUGE_HVR1400:
i2c_bus = &dev->i2c_bus[0];
- fe0->dvb.frontend = dvb_attach(dib7000p_init,
- &i2c_bus->i2c_adap,
+
+ if (!dvb_attach(dib7000p_attach, &dib7000p_ops))
+ return -ENODEV;
+
+ fe0->dvb.frontend = dib7000p_ops.init(&i2c_bus->i2c_adap,
0x12, &hauppauge_hvr1400_dib7000_config);
if (fe0->dvb.frontend != NULL) {
struct dvb_frontend *fe;