Skip to content

Commit f1b80a3

Browse files
idoschrafaeljw
authored andcommitted
thermal: core: Restore behavior regarding invalid trip points
Commit 7c3d5c2 ("thermal/core: Add a generic thermal_zone_get_trip() function") stopped marking trip points with a zero temperature as disabled, behavior that was originally introduced in commit 81ad427 ("Thermal: Ignore invalid trip points"). When using the mlxsw driver we see that when such trip points are not disabled, the thermal subsystem repeatedly tries to set the state of the associated cooling devices to the maximum state. Address this by restoring the original behavior and mark trip points with a zero temperature as disabled. Fixes: 7c3d5c2 ("thermal/core: Add a generic thermal_zone_get_trip() function") Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent e8d018d commit f1b80a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
13091309
struct thermal_trip trip;
13101310

13111311
result = thermal_zone_get_trip(tz, count, &trip);
1312-
if (result)
1312+
if (result || !trip.temperature)
13131313
set_bit(count, &tz->trips_disabled);
13141314
}
13151315

0 commit comments

Comments
 (0)