Skip to content

Commit 8820087

Browse files
committed
Merge thermal core material depended on by subsequent changes.
2 parents 1dd72ce + a56cc0a commit 8820087

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

drivers/thermal/thermal_trip.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ int for_each_thermal_trip(struct thermal_zone_device *tz,
2727
}
2828
EXPORT_SYMBOL_GPL(for_each_thermal_trip);
2929

30+
int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
31+
int (*cb)(struct thermal_trip *, void *),
32+
void *data)
33+
{
34+
int ret;
35+
36+
mutex_lock(&tz->lock);
37+
ret = for_each_thermal_trip(tz, cb, data);
38+
mutex_unlock(&tz->lock);
39+
40+
return ret;
41+
}
42+
EXPORT_SYMBOL_GPL(thermal_zone_for_each_trip);
43+
3044
int thermal_zone_get_num_trips(struct thermal_zone_device *tz)
3145
{
3246
return tz->num_trips;

include/linux/thermal.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id,
286286
int for_each_thermal_trip(struct thermal_zone_device *tz,
287287
int (*cb)(struct thermal_trip *, void *),
288288
void *data);
289+
int thermal_zone_for_each_trip(struct thermal_zone_device *tz,
290+
int (*cb)(struct thermal_trip *, void *),
291+
void *data);
289292
int thermal_zone_get_num_trips(struct thermal_zone_device *tz);
290293

291294
int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp);

0 commit comments

Comments
 (0)