Commit bc840ea5 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

thermal: core: Do not handle trip points with invalid temperature

Trip points with temperature set to THERMAL_TEMP_INVALID are as good as
disabled, so make handle_thermal_trip() ignore them.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 1996e9d7
...@@ -348,7 +348,8 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip_id) ...@@ -348,7 +348,8 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip_id)
struct thermal_trip trip; struct thermal_trip trip;
/* Ignore disabled trip points */ /* Ignore disabled trip points */
if (test_bit(trip_id, &tz->trips_disabled)) if (test_bit(trip_id, &tz->trips_disabled) ||
trip.temperature == THERMAL_TEMP_INVALID)
return; return;
__thermal_zone_get_trip(tz, trip_id, &trip); __thermal_zone_get_trip(tz, trip_id, &trip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment