Commit be2d7320 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Cameron

iio: adc: sun4i: add THERMAL dependency

With CONFIG_THERMAL=m and CONFIG_SUN4I_GPADC=y, we get a link error
from calling devm_thermal_zone_of_sensor_register:

drivers/iio/built-in.o: In function `sun4i_gpadc_probe':
:(.text+0x1c284): undefined reference to `devm_thermal_zone_of_sensor_register'

This adds a Kconfig dependency to ensure we can only have the ADC
driver as built-in when this function is also built-in, or when
we see the empty stub implementation. When the thermal code is
a module, we can still build the adc driver as a module, too.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: d1caa990 ("iio: adc: add support for Allwinner SoCs ADC")
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent bc82222f
...@@ -595,6 +595,7 @@ config SUN4I_GPADC ...@@ -595,6 +595,7 @@ config SUN4I_GPADC
tristate "Support for the Allwinner SoCs GPADC" tristate "Support for the Allwinner SoCs GPADC"
depends on IIO depends on IIO
depends on MFD_SUN4I_GPADC depends on MFD_SUN4I_GPADC
depends on THERMAL || !THERMAL_OF
help help
Say yes here to build support for Allwinner (A10, A13 and A31) SoCs Say yes here to build support for Allwinner (A10, A13 and A31) SoCs
GPADC. This ADC provides 4 channels which can be used as an ADC or as GPADC. This ADC provides 4 channels which can be used as an ADC or as
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment