summaryrefslogtreecommitdiff
path: root/drivers/thermal/thermal_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/thermal_core.h')
-rw-r--r--drivers/thermal/thermal_core.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h
index 024e82ebf592..0a3b3ec5120b 100644
--- a/drivers/thermal/thermal_core.h
+++ b/drivers/thermal/thermal_core.h
@@ -70,7 +70,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);
-int get_tz_trend(struct thermal_zone_device *tz, int trip_index);
+int get_tz_trend(struct thermal_zone_device *tz, const struct thermal_trip *trip);
struct thermal_instance *
get_thermal_instance(struct thermal_zone_device *tz,
@@ -116,6 +116,9 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
enum thermal_notify_event event);
/* Helpers */
+#define for_each_trip(__tz, __trip) \
+ for (__trip = __tz->trips; __trip - __tz->trips < __tz->num_trips; __trip++)
+
void __thermal_zone_set_trips(struct thermal_zone_device *tz);
int __thermal_zone_get_trip(struct thermal_zone_device *tz, int trip_id,
struct thermal_trip *trip);