]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iio: adc: sun4i: add THERMAL dependency
authorArnd Bergmann <arnd@arndb.de>
Tue, 28 Mar 2017 10:07:23 +0000 (12:07 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Apr 2017 10:36:27 +0000 (11:36 +0100)
commitbe2d73208606bc5d52e60dea223da77f49d58340
tree70229dba4fa39b4888e308efb592b60c35264b6d
parentbc82222fcca1ec3702caf98eb4a3ab0edfa6f789
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>
drivers/iio/adc/Kconfig