Skip to content

Commit

Permalink
Input: raspberrypi-ts - fix link error
Browse files Browse the repository at this point in the history
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: 0b9f28f ("Input: add official Raspberry Pi's touchscreen driver")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Anders Roxell authored and Dmitry Torokhov committed Jan 14, 2019
1 parent fe2bfd0 commit 4add635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ config TOUCHSCREEN_EDT_FT5X06

config TOUCHSCREEN_RASPBERRYPI_FW
tristate "Raspberry Pi's firmware base touch screen support"
depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST
depends on RASPBERRYPI_FIRMWARE || (RASPBERRYPI_FIRMWARE=n && COMPILE_TEST)
help
Say Y here if you have the official Raspberry Pi 7 inch screen on
your system.
Expand Down

0 comments on commit 4add635

Please sign in to comment.