1
0
Fork 0
remarkable-linux/include
Arnd Bergmann c55befc42a iio: stm32: fix adc/trigger link error
commit 6d745ee8b5 upstream.

The ADC driver can trigger on either the timer or the lptim
trigger, but it only uses a Kconfig 'select' statement
to ensure that the first of the two is present. When the lptim
trigger is enabled as a loadable module, and the adc driver
is built-in, we now get a link error:

drivers/iio/adc/stm32-adc.o: In function `stm32_adc_get_trig_extsel':
stm32-adc.c:(.text+0x4e0): undefined reference to `is_stm32_lptim_trigger'

We could use a second 'select' statement and always have both
trigger drivers enabled when the adc driver is, but it seems that
the lptimer trigger was intentionally left optional, so it seems
better to keep it that way.

This adds a hack to use 'IS_REACHABLE()' rather than 'IS_ENABLED()',
which avoids the link error, but instead leads to the lptimer trigger
not being used in the broken configuration. I've added a runtime
warning for this case to help users figure out what they did wrong
if this should ever be done by accident.

Fixes: f0b638a7f6 ("iio: adc: stm32: add support for lptimer triggers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-14 09:52:48 +01:00
..
acpi ACPI / EC: Fix regression related to PM ops support in ECDT device 2017-12-05 11:26:33 +01:00
asm-generic locking/refcounts, x86/asm: Use unique .text section for refcount exceptions 2017-12-10 13:40:42 +01:00
clocksource License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
crypto crypto: af_alg - remove locking in async callback 2017-12-05 11:26:30 +01:00
drm drm/edid: Don't send non-zero YQ in AVI infoframe for HDMI 1.x sinks 2017-12-05 11:26:37 +01:00
dt-bindings License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
keys License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kvm KVM: arm/arm64: PMU: Fix overflow interrupt injection 2017-07-25 14:18:01 +01:00
linux iio: stm32: fix adc/trigger link error 2017-12-14 09:52:48 +01:00
math-emu
media License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memory
misc
net uapi: fix linux/tls.h userspace compilation error 2017-11-30 08:40:40 +00:00
pcmcia
ras License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rdma License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scsi License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
soc ARM: SoC driver updates for v4.14 2017-09-10 20:40:00 -07:00
sound ALSA: hda - Fix yet remaining issue with vmaster 0dB initialization 2017-11-30 08:40:49 +00:00
target target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK 2017-11-30 08:40:51 +00:00
trace SUNRPC: Fix tracepoint storage issues with svc_recv and svc_rqst_status 2017-11-30 08:40:53 +00:00
uapi USB: core: Add type-specific length check of BOS descriptors 2017-12-10 13:40:44 +01:00
video License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00