Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 72196c2

Browse files
committed
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>
1 parent 2c637af commit 72196c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/thermal/thermal_core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,9 @@ static void thermal_governor_trip_crossed(struct thermal_governor *governor,
463463
const struct thermal_trip *trip,
464464
bool crossed_up)
465465
{
466+
if (trip->type == THERMAL_TRIP_HOT || trip->type == THERMAL_TRIP_CRITICAL)
467+
return;
468+
466469
if (governor->trip_crossed)
467470
governor->trip_crossed(tz, trip, crossed_up);
468471
}

0 commit comments

Comments
 (0)