===================================================================
@@ -109,7 +109,6 @@ static void thermal_zone_trip_update(str
enum thermal_trend trend;
struct thermal_instance *instance;
bool throttle = false;
- int old_target;
if (trip == THERMAL_TRIPS_NONE) {
trip_temp = tz->forced_passive;
@@ -130,18 +129,15 @@ static void thermal_zone_trip_update(str
if (instance->trip != trip)
continue;
- old_target = instance->target;
- instance->target = get_target_state(instance, trend, throttle);
+ if (!throttle && instance->target == THERMAL_NO_TARGET)
+ continue;
- /* Activate a passive thermal instance */
- if (old_target == THERMAL_NO_TARGET &&
- instance->target != THERMAL_NO_TARGET)
- update_passive_instance(tz, trip_type, 1);
- /* Deactivate a passive thermal instance */
- else if (old_target != THERMAL_NO_TARGET &&
- instance->target == THERMAL_NO_TARGET)
- update_passive_instance(tz, trip_type, -1);
+ instance->target = get_target_state(instance, trend, throttle);
+ /* Activate or deactivate a passive thermal instance */
+ if (instance->target == THERMAL_NO_TARGET)
+ update_passive_instance(tz, trip_type,
+ throttle ? 1 : -1);
instance->cdev->updated = false; /* cdev needs update */
}