Skip to contentSkip to conversation

hwmon: scpi: add thermal-of dependency

PATCH Applied Arnd Bergmann 2 participants 2 messages Nov 16, 2015 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: scpi: add thermal-of dependency

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.

Fixes 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors")
drivers/hwmon/Kconfig +1 -0
index 842b0043ad94..597814177f50 100644
@@ -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
maintainer Applied
#1 lore raw
Quoted 9 lines · Arnd Bergmann

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'

Quoted 8 lines

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.

Fixes 68acc77a2d51 ("hwmon: Support thermal zones registration for SCP temperature sensors")

Applied.

Thanks,
Guenter

Quoted 15 lines
drivers/hwmon/Kconfig +1 -0
index 842b0043ad94..597814177f50 100644
@@ -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