mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 21:24:08 +08:00
thermal: core: Restore behavior regarding invalid trip points
Commit7c3d5c20dc
("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 commit81ad4276b5
("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:7c3d5c20dc
("thermal/core: Add a generic thermal_zone_get_trip() function") Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
e8d018dd02
commit
f1b80a3878
@ -1309,7 +1309,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
|
||||
struct thermal_trip trip;
|
||||
|
||||
result = thermal_zone_get_trip(tz, count, &trip);
|
||||
if (result)
|
||||
if (result || !trip.temperature)
|
||||
set_bit(count, &tz->trips_disabled);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user