• Arnd Bergmann's avatar
    [media] dvb-usb: split out common parts of dibusb · e91455a1
    Arnd Bergmann authored
    Tha ARM randconfig builds came up with another rare build failure
    for the dib3000mc driver, when dvb-usb-dibusb-mb is built-in and
    dib3000mc is a loadable module:
    
    ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
    ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/usb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
    
    Apparently this used to be a valid configuration (build-time, not
    run-time), but broke as part of a cleanup.
    
    I tried reverting the cleanup, but saw that the code was still wrong
    then. This tries to fix the code properly, by moving the problematic
    functions into a new file that now is built as a loadable module or
    built-in, whichever is correct for a particular configuration. It fixes
    the regression as well as the runtime problem that already existed.
    
    The new module dependency chain is now:
    
       dvb-usb-{dibusb_mc,a800,dib0700,umt-010,gp8psk}   dvb-usb-dibusb-mb
             |                        |                   |          |
       dvb-usb-dibusb-mc-common       |        ___________|          |
             |               |        |        |                     |
       dib3000mc (frontend)  |        |        |         dib3000mb (frontend)
                             |        |        |
                             |        |        |
                            dvb-usb-dibusb-common
    
    I have also checked the two other files that were changed in the original
    cleanup, and found them to be correct in either version, so I do not
    touch that part.
    
    As this is a rather obscure bug, there is no need for backports.
    
    Fixes: 028c70ff ("[media] dvb-usb/dvb-usb-v2: use IS_ENABLED")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    e91455a1
dibusb-mc-common.c 4.26 KB