Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1610527 > unrolled thread

[PATCH] iio: adc: sun4i: add THERMAL dependency

Started byArnd Bergmann <arnd@arndb.de>
First post2017-03-28 12:20 +0200
Last post2017-04-02 12:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iio: adc: sun4i: add THERMAL dependency Arnd Bergmann <arnd@arndb.de> - 2017-03-28 12:20 +0200
    Re: [PATCH] iio: adc: sun4i: add THERMAL dependency Jonathan Cameron <jic23@kernel.org> - 2017-04-02 12:40 +0200

#1610527 — [PATCH] iio: adc: sun4i: add THERMAL dependency

FromArnd Bergmann <arnd@arndb.de>
Date2017-03-28 12:20 +0200
Subject[PATCH] iio: adc: sun4i: add THERMAL dependency
Message-ID<tpWoh-65Z-1@gated-at.bofh.it>
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>
---
 drivers/iio/adc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index d0af51d7bcac..7ccbad70a617 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -562,6 +562,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
-- 
2.9.0

[toc] | [next] | [standalone]


#1614695

FromJonathan Cameron <jic23@kernel.org>
Date2017-04-02 12:40 +0200
Message-ID<trL5o-7Fe-3@gated-at.bofh.it>
In reply to#1610527
On 28/03/17 11:07, Arnd Bergmann wrote:
> 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>
Thanks Arnd,

Applied to the togreg branch of iio.git.  Should be heading
to Greg later today if build tests pass on the branch.

I've added a fixes tag.

Jonathan
> ---
>  drivers/iio/adc/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index d0af51d7bcac..7ccbad70a617 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -562,6 +562,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
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web