Skip to content

Commit d42d5b6

Browse files
arndbgroeck
authored andcommitted
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. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 68acc77 ("hwmon: Support thermal zones registration for SCP temperature sensors") Signed-off-by: Guenter Roeck <[email protected]>
1 parent 5e0a0ee commit d42d5b6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hwmon/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ config SENSORS_APPLESMC
324324
config SENSORS_ARM_SCPI
325325
tristate "ARM SCPI Sensors"
326326
depends on ARM_SCPI_PROTOCOL
327+
depends on THERMAL || !THERMAL_OF
327328
help
328329
This driver provides support for temperature, voltage, current
329330
and power sensors available on ARM Ltd's SCP based platforms. The

0 commit comments

Comments
 (0)