From: Randy Dunlap Date: Thu, 5 Mar 2015 23:27:34 +0000 (-0800) Subject: hwmon: (pwm-fan) Fix build when THERMAL=m X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=18fd303fea21c98b0b72534e6db47e80d12bf311;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git hwmon: (pwm-fan) Fix build when THERMAL=m Fix build errors when CONFIG_THERMAL=m and SENSORS_PWM_FAN=y by restricting SENSORS_PWM_FAN to 'm' when THERMAL=m. drivers/built-in.o: In function `pwm_fan_remove': pwm-fan.c:(.text+0x22ba58): undefined reference to `thermal_cooling_device_unregister' drivers/built-in.o: In function `pwm_fan_probe': pwm-fan.c:(.text+0x22bebb): undefined reference to `thermal_of_cooling_device_register' pwm-fan.c:(.text+0x22bf11): undefined reference to `thermal_cdev_update' Signed-off-by: Randy Dunlap Cc: Kamil Debski Signed-off-by: Guenter Roeck --- diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 2a5dd697c142..c7db7ded9db7 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -1174,6 +1174,7 @@ source drivers/hwmon/pmbus/Kconfig config SENSORS_PWM_FAN tristate "PWM fan" depends on (PWM && OF) || COMPILE_TEST + depends on THERMAL || THERMAL=n help If you say yes here you get support for fans connected to PWM lines. The driver uses the generic PWM interface, thus it will work on a