diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-07 21:11:07 +0300 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-08-17 12:25:22 +0300 |
| commit | 96b8b4365db44af0a94b91a805cd5beed45d24fa (patch) | |
| tree | 42bb2cf723090865a909389481df429d6216928f /include/linux | |
| parent | 68b77785a1db293582558bc1460b19e8355b8f7a (diff) | |
| download | linux-96b8b4365db44af0a94b91a805cd5beed45d24fa.tar.xz | |
thermal: core: Rework and rename __for_each_thermal_trip()
Rework the currently unused __for_each_thermal_trip() to pass original
pointers to struct thermal_trip objects to the callback, so it can be
used for updating trip data (e.g. temperatures), rename it to
for_each_thermal_trip() and make it available to modular drivers.
Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/thermal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index f1b43d8a7bd3..f1d73642177f 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -289,6 +289,9 @@ int thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id, int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id, const struct thermal_trip *trip); +int for_each_thermal_trip(struct thermal_zone_device *tz, + int (*cb)(struct thermal_trip *, void *), + void *data); int thermal_zone_get_num_trips(struct thermal_zone_device *tz); int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp); |
