diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-03-28 12:07:23 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-04-02 11:36:27 +0100 |
commit | be2d73208606bc5d52e60dea223da77f49d58340 (patch) | |
tree | 70229dba4fa39b4888e308efb592b60c35264b6d /drivers | |
parent | bc82222fcca1ec3702caf98eb4a3ab0edfa6f789 (diff) | |
download | linux-stable-be2d73208606bc5d52e60dea223da77f49d58340.tar.gz linux-stable-be2d73208606bc5d52e60dea223da77f49d58340.tar.bz2 linux-stable-be2d73208606bc5d52e60dea223da77f49d58340.zip |
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: Arnd Bergmann <arnd@arndb.de>
Fixes: d1caa99055382 ("iio: adc: add support for Allwinner SoCs ADC")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/iio/adc/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 79b04693a5d1..b7b3a9a80043 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -595,6 +595,7 @@ config SUN4I_GPADC tristate "Support for the Allwinner SoCs GPADC" depends on IIO depends on MFD_SUN4I_GPADC + depends on THERMAL || !THERMAL_OF help 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 |