• Arnd Bergmann's avatar
    [media] zd1301: fix building interface driver without demodulator · 0d1270df
    Arnd Bergmann authored
    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: 47d65372 ("[media] zd1301_demod: ZyDAS ZD1301 DVB-T demodulator driver")
    Fixes: 992b3987 ("[media] zd1301: ZyDAS ZD1301 DVB USB interface driver")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    0d1270df
zd1301_demod.h 2.05 KB