Skip to contentSkip to conversation

hwmon: aspeed: add THERMAL dependency

PATCH Applied Arnd Bergmann 2 participants 2 messages Aug 15, 2017 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: aspeed: add THERMAL dependency

With CONFIG_THERMAL=m, a built-in aspeed pwm tacho driver causes a link error:

drivers/hwmon/aspeed-pwm-tacho.o: In function `aspeed_pwm_tacho_probe':
aspeed-pwm-tacho.c:(.text+0x7f0): undefined reference to `thermal_of_cooling_device_register'

This adds a dependency similar to what other hwmon drivers use, ensuring that the aspeed driver cannot be built-in in this case but has to be a module. With THERMAL=n, we still allow building it.

Fixes 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach")
---
 drivers/hwmon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/Kconfig +1 -0
index 5ef2814345ef..5b9a61f766ac 100644
@@ -343,6 +343,7 @@ config SENSORS_ASB100
 
 config SENSORS_ASPEED
 	tristate "ASPEED AST2400/AST2500 PWM and Fan tach driver"
+	depends on THERMAL || THERMAL=n
 	select REGMAP
 	help
 	  This driver provides support for ASPEED AST2400/AST2500 PWM
Signature · 1 line
2.9.0
maintainer Applied
#1 lore raw
Quoted 6 lines · Arnd Bergmann

With CONFIG_THERMAL=m, a built-in aspeed pwm tacho driver causes a link error:

drivers/hwmon/aspeed-pwm-tacho.o: In function `aspeed_pwm_tacho_probe':
aspeed-pwm-tacho.c:(.text+0x7f0): undefined reference to `thermal_of_cooling_device_register'

Quoted 6 lines

This adds a dependency similar to what other hwmon drivers use, ensuring that the aspeed driver cannot be built-in in this case but has to be a module. With THERMAL=n, we still allow building it.

Fixes 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach")

Applied to hwmon-next.

Thanks,
Guenter

Quoted 23 lines
---
 drivers/hwmon/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/Kconfig +1 -0
index 5ef2814345ef..5b9a61f766ac 100644
@@ -343,6 +343,7 @@ config SENSORS_ASB100
 
 config SENSORS_ASPEED
 	tristate "ASPEED AST2400/AST2500 PWM and Fan tach driver"
+	depends on THERMAL || THERMAL=n
 	select REGMAP
 	help
 	  This driver provides support for ASPEED AST2400/AST2500 PWM
Signature · 6 lines
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html