summaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-03 15:17:24 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-10-05 13:13:40 +0200
commita56cc0a8338523f709892696cc229527617c1316 (patch)
tree6877546259b1c0d9e39f0cdf966d1fb44071805f /include/linux/thermal.h
parentd069ed6b752f91cea6341a9c60be42837678a7f5 (diff)
downloadlinux-a56cc0a8338523f709892696cc229527617c1316.tar.gz
linux-a56cc0a8338523f709892696cc229527617c1316.tar.bz2
linux-a56cc0a8338523f709892696cc229527617c1316.zip
thermal: core: Add function to walk trips under zone lock
Add a wrapper around for_each_thermal_trip(), called thermal_zone_for_each_trip(), that will invoke the former under the thermal zone lock and pass its return value to the caller. Two drivers will be modified subsequently to use this new function. No functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 6710a4ace992..2bab72149bbf 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -286,6 +286,9 @@ int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id,
int for_each_thermal_trip(struct thermal_zone_device *tz,
int (*cb)(struct thermal_trip *, void *),
void *data);
+int thermal_zone_for_each_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);