• Eugen Hristev's avatar
    media: atmel: fix build when ISC=m and XISC=y · f1de1c78
    Eugen Hristev authored
    Building VIDEO_ATMEL_ISC as module and VIDEO_ATMEL_XISC as built-in
    (or viceversa) causes build errors:
    
     or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o: in function `isc_async_complete':
     atmel-isc-base.c:(.text+0x40d0): undefined reference to `__this_module'
     or1k-linux-ld: atmel-isc-base.c:(.text+0x40f0): undefined reference to `__this_module'
     or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o:(.rodata+0x390): undefined reference to `__this_module'
     or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o:(__param+0x4): undefined reference to `__this_module'
     or1k-linux-ld: drivers/media/platform/atmel/atmel-isc-base.o:(__param+0x18): undefined reference to `__this_module'
    
    This is caused by the file atmel-isc-base.c which is common code between
    the two drivers.
    
    The solution is to create another Kconfig symbol that is automatically
    selected and generates the module atmel-isc-base.ko. This module can be
    loaded when both drivers are modules, or built-in when at least one of them
    is built-in.
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Fixes: c9aa9738 ("media: atmel: atmel-isc: add microchip-xisc driver")
    Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
    Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    f1de1c78
Makefile 308 Bytes