diff options
author | Lukasz Luba <lukasz.luba@arm.com> | 2021-04-22 14:43:06 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2021-04-22 15:10:28 +0300 |
commit | b70dbf40eb075c596d86c42d93b86ff502290fc5 (patch) | |
tree | 01e82cd6eb5677ffb789563cf1a64b1f490d05b4 /drivers/thermal/thermal_core.h | |
parent | 26b2f03d2adf43d0dc9aeeb3fff54dcc9fcdb1f4 (diff) |
thermal/core: Create a helper __thermal_cdev_update() without a lock
There is a need to have a helper function which updates cooling device
state from the governors code. With this change governor can use
lock and unlock while calling helper function. This avoid unnecessary
second time lock/unlock which was in previous solution present in
governor implementation. This new helper function must be called
with mutex 'cdev->lock' hold.
The changed been discussed and part of code presented in thread:
https://lore.kernel.org/linux-pm/20210419084536.25000-1-lukasz.luba@arm.com/
Co-developed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://lore.kernel.org/r/20210422114308.29684-2-lukasz.luba@arm.com
Diffstat (limited to 'drivers/thermal/thermal_core.h')
-rw-r--r-- | drivers/thermal/thermal_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 86b8cef7310e..726e327b4205 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -66,6 +66,7 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) } void thermal_cdev_update(struct thermal_cooling_device *); +void __thermal_cdev_update(struct thermal_cooling_device *cdev); /** * struct thermal_trip - representation of a point in temperature domain |