summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-10-16 13:26:20 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-10-24 17:15:06 +0200
commite254ec292f55fd76a554b1b2be267a02691d1042 (patch)
tree3ddca19fe539e613b80fab90c424ec820e10d9d9 /drivers/thermal
parentca70d55ab0aa4510618ebf6bc5f5da5dd33736d5 (diff)
downloadlwn-e254ec292f55fd76a554b1b2be267a02691d1042.tar.gz
lwn-e254ec292f55fd76a554b1b2be267a02691d1042.zip
thermal: core: Rearrange __thermal_zone_device_update()
In preparation for subsequent changes, move the invocations of thermal_thresholds_handle() and thermal_zone_set_trips() in __thermal_zone_device_update() after the processing of the temporary trip lists. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Link: https://patch.msgid.link/3323276.44csPzL39Z@rjwysocki.net
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/thermal_core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 9252c89ec38e..f83c5c67cbe5 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -588,10 +588,6 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
high = td->threshold;
}
- thermal_thresholds_handle(tz, &low, &high);
-
- thermal_zone_set_trips(tz, low, high);
-
list_for_each_entry_safe(td, next, &way_up_list, list_node) {
thermal_trip_crossed(tz, &td->trip, governor, true);
list_del_init(&td->list_node);
@@ -602,6 +598,10 @@ void __thermal_zone_device_update(struct thermal_zone_device *tz,
list_del_init(&td->list_node);
}
+ thermal_thresholds_handle(tz, &low, &high);
+
+ thermal_zone_set_trips(tz, low, high);
+
if (governor->manage)
governor->manage(tz);