• Anders Roxell's avatar
    Input: raspberrypi-ts - fix link error · 4add635b
    Anders Roxell authored
    Fix link error when TOUCHSCREEN_RASPBERRYPI_FW is enabled as a module and
    the dependent module is built-in.  The 'depends on RASPBERRYPI_FIRMWARE' by
    itself prevents the touchscreen driver from being built-in when the
    firmware is configured as a module.  However, the '|| COMPILE_TEST' still
    allows it unless we explicitly prevent that configuration with
    '|| (RASPBERRYPI_FIRMWARE=n && COMPILE_TEST)'.
    
    ld: drivers/input/touchscreen/raspberrypi-ts.o: in function `rpi_ts_probe':
    raspberrypi-ts.c:(.text+0x3a8): undefined reference to `rpi_firmware_get'
    ld: raspberrypi-ts.c:(.text+0x3a8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_get'
    ld: raspberrypi-ts.c:(.text+0x4c8): undefined reference to `rpi_firmware_property'
    ld: raspberrypi-ts.c:(.text+0x4c8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rpi_firmware_property'
    
    Rework so that TOUCHSCREEN_RASPBERRYPI_FW depends on
    RASPBERRYPI_FIRMWARE=n if COMPILE_TEST is enabled.
    
    Fixes: 0b9f28fe ("Input: add official Raspberry Pi's touchscreen driver")
    Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
    Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
    4add635b
Kconfig 35.1 KB