diff options
Diffstat (limited to 'drivers/thermal/thermal_trip.c')
-rw-r--r-- | drivers/thermal/thermal_trip.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/thermal/thermal_trip.c b/drivers/thermal/thermal_trip.c index 6dff0dae6ef6..9e07535d99bb 100644 --- a/drivers/thermal/thermal_trip.c +++ b/drivers/thermal/thermal_trip.c @@ -13,10 +13,11 @@ int for_each_thermal_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data) { - int i, ret; + struct thermal_trip *trip; + int ret; - for (i = 0; i < tz->num_trips; i++) { - ret = cb(&tz->trips[i], data); + for_each_trip(tz, trip) { + ret = cb(trip, data); if (ret) return ret; } |