]> git.baikalelectronics.ru Git - kernel.git/commit
[media] zd1301: fix building interface driver without demodulator
authorArnd Bergmann <arnd@arndb.de>
Tue, 7 Feb 2017 13:01:41 +0000 (11:01 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 8 Feb 2017 13:59:39 +0000 (11:59 -0200)
commit6596522f5bef9a4e6416e98c5842f92bf5cc2769
tree3d79a2e640e89ab81e443256d2c407e78d5f5277
parent4e18bdf3d2fdecec95163d1352dd79411954faab
[media] zd1301: fix building interface driver without demodulator

If the USB driver is enabled but the demodulator is not, we get a link error:

ERROR: "zd1301_demod_get_dvb_frontend" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined!
ERROR: "zd1301_demod_get_i2c_adapter" [drivers/media/usb/dvb-usb-v2/zd1301.ko] undefined!

Such a configuration obviously makes no sense, but we should not fail
the build.  This tries to mimic what we have for other drivers by turning
the build failure into a runtime failure.

Alternatively we could use an unconditional 'select' or 'depends on' to enforce
a sane configuration.

Fixes: e2ad6638012e ("[media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driver")
Fixes: d1c8570cbbfb ("[media] zd1301: ZyDAS ZD1301 DVB USB interface driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/zd1301_demod.h
drivers/media/usb/dvb-usb-v2/zd1301.c