summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-05-28 18:54:11 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-06-11 21:06:44 +0200
commit72196c20c38b50c4293696377145e6c4ad9a7c67 (patch)
tree308ab5ef06febf414838f70d02a5fdb86942ca66
parent2c637af8a74d9a2a52ee5456a75dd29c8cb52da5 (diff)
thermal: core: Avoid calling .trip_crossed() for critical and hot trips
Invoking the governor .trip_crossed() callback for critical and hot trips is pointless because they are handled directly by the core, so make thermal_governor_trip_crossed() avoid doing that. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/thermal/thermal_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 57f20326aa91..8bb63a364cba 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -463,6 +463,9 @@ static void thermal_governor_trip_crossed(struct thermal_governor *governor,
const struct thermal_trip *trip,
bool crossed_up)
{
+ if (trip->type == THERMAL_TRIP_HOT || trip->type == THERMAL_TRIP_CRITICAL)
+ return;
+
if (governor->trip_crossed)
governor->trip_crossed(tz, trip, crossed_up);
}