linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: scpi: add thermal-of dependency
@ 2015-11-16 16:56 Arnd Bergmann
  2015-11-16 17:55 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2015-11-16 16:56 UTC (permalink / raw)
  To: linux-arm-kernel

The newly added scpi thermal support is broken when the scpi driver
is built-in but the thermal driver is a loadable module:

drivers/built-in.o: In function `scpi_hwmon_probe':
(.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister'
(.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register'
drivers/built-in.o: In function `scpi_hwmon_remove':
(text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister'

This uses the same Kconfig trick that we have in a couple of other
drivers already to ensure we can only select the driver in valid
configurations when either THERMAL_OF is disabled, or when with a
dependency on CONFIG_THERMAL that can force SCPI to be a loadable
module in the case I was hitting.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors")

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 842b0043ad94..597814177f50 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -324,6 +324,7 @@ config SENSORS_APPLESMC
 config SENSORS_ARM_SCPI
 	tristate "ARM SCPI Sensors"
 	depends on ARM_SCPI_PROTOCOL
+	depends on THERMAL || !THERMAL_OF
 	help
 	  This driver provides support for temperature, voltage, current
 	  and power sensors available on ARM Ltd's SCP based platforms. The

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] hwmon: scpi: add thermal-of dependency
  2015-11-16 16:56 [PATCH] hwmon: scpi: add thermal-of dependency Arnd Bergmann
@ 2015-11-16 17:55 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2015-11-16 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

On 11/16/2015 08:56 AM, Arnd Bergmann wrote:
> The newly added scpi thermal support is broken when the scpi driver
> is built-in but the thermal driver is a loadable module:
>
> drivers/built-in.o: In function `scpi_hwmon_probe':
> (.text+0x444d70): undefined reference to `thermal_zone_of_sensor_unregister'
> (.text+0x444d94): undefined reference to `thermal_zone_of_sensor_register'
> drivers/built-in.o: In function `scpi_hwmon_remove':
> (text+0x444e6c): undefined reference to `thermal_zone_of_sensor_unregister'
>
> This uses the same Kconfig trick that we have in a couple of other
> drivers already to ensure we can only select the driver in valid
> configurations when either THERMAL_OF is disabled, or when with a
> dependency on CONFIG_THERMAL that can force SCPI to be a loadable
> module in the case I was hitting.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors")

Applied.

Thanks,
Guenter

>
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 842b0043ad94..597814177f50 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -324,6 +324,7 @@ config SENSORS_APPLESMC
>   config SENSORS_ARM_SCPI
>   	tristate "ARM SCPI Sensors"
>   	depends on ARM_SCPI_PROTOCOL
> +	depends on THERMAL || !THERMAL_OF
>   	help
>   	  This driver provides support for temperature, voltage, current
>   	  and power sensors available on ARM Ltd's SCP based platforms. The
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-16 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 16:56 [PATCH] hwmon: scpi: add thermal-of dependency Arnd Bergmann
2015-11-16 17:55 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).