upstream: [media] dib7000: export just one symbol
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 29 May 2014 12:20:15 +0000 (09:20 -0300)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 05:32:06 +0000 (14:32 +0900)
commit36032535035ff85ed53d113e17485999f0e98642
tree2ea3a7bfff27e068e7c89b0e874c370db79cdf5b
parent6dc95f93b6a356d2845ea1a3e9ab4a3025f2efaa
upstream: [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>
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=8abe4a0a3f6d
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/dib7000p.c
drivers/media/dvb-frontends/dib7000p.h
drivers/media/pci/cx23885/cx23885-dvb.c
drivers/media/usb/dvb-usb/cxusb.c
drivers/media/usb/dvb-usb/dib0700_devices.c