Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal/core: Make cooling device state change private

The change of the cooling device state should be used by the governor
or at least by the core code, not by the drivers themselves.

Remove the API usage and move the function declaration to the internal
headers.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20210118173824.9970-1-daniel.lezcano@linaro.org

+2 -5
-1
drivers/hwmon/pwm-fan.c
··· 422 422 return ret; 423 423 } 424 424 ctx->cdev = cdev; 425 - thermal_cdev_update(cdev); 426 425 } 427 426 428 427 return 0;
-1
drivers/thermal/khadas_mcu_fan.c
··· 100 100 return ret; 101 101 } 102 102 ctx->cdev = cdev; 103 - thermal_cdev_update(cdev); 104 103 105 104 return 0; 106 105 }
+2
drivers/thermal/thermal_core.h
··· 65 65 cdev->ops->power2state; 66 66 } 67 67 68 + void thermal_cdev_update(struct thermal_cooling_device *); 69 + 68 70 /** 69 71 * struct thermal_trip - representation of a point in temperature domain 70 72 * @np: pointer to struct device_node that this trip point was created from
-3
include/linux/thermal.h
··· 390 390 int thermal_zone_get_slope(struct thermal_zone_device *tz); 391 391 int thermal_zone_get_offset(struct thermal_zone_device *tz); 392 392 393 - void thermal_cdev_update(struct thermal_cooling_device *); 394 393 void thermal_notify_framework(struct thermal_zone_device *, int); 395 394 int thermal_zone_device_enable(struct thermal_zone_device *tz); 396 395 int thermal_zone_device_disable(struct thermal_zone_device *tz); ··· 436 437 struct thermal_zone_device *tz) 437 438 { return -ENODEV; } 438 439 439 - static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) 440 - { } 441 440 static inline void thermal_notify_framework(struct thermal_zone_device *tz, 442 441 int trip) 443 442 { }