Commit 053b852c authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

thermal: gov_step_wise: Simplify checks related to passive trips

Make it more clear from the code flow that the passive polling status
updates only take place for passive trip points.

No intentional functional impact.
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
parent f1164d33
...@@ -92,15 +92,13 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, ...@@ -92,15 +92,13 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz,
if (instance->initialized && old_target == instance->target) if (instance->initialized && old_target == instance->target)
continue; continue;
if (old_target == THERMAL_NO_TARGET && if (trip->type == THERMAL_TRIP_PASSIVE) {
instance->target != THERMAL_NO_TARGET) { /* If needed, update the status of passive polling. */
/* Activate a passive thermal instance */ if (old_target == THERMAL_NO_TARGET &&
if (trip->type == THERMAL_TRIP_PASSIVE) instance->target != THERMAL_NO_TARGET)
tz->passive++; tz->passive++;
} else if (old_target != THERMAL_NO_TARGET && else if (old_target != THERMAL_NO_TARGET &&
instance->target == THERMAL_NO_TARGET) { instance->target == THERMAL_NO_TARGET)
/* Deactivate a passive thermal instance */
if (trip->type == THERMAL_TRIP_PASSIVE)
tz->passive--; tz->passive--;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment