aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/step_wise.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/thermal/step_wise.c b/drivers/thermal/step_wise.c
index be95826631b7..ee047ca43084 100644
--- a/drivers/thermal/step_wise.c
+++ b/drivers/thermal/step_wise.c
@@ -31,8 +31,7 @@
31 * If the temperature is higher than a trip point, 31 * If the temperature is higher than a trip point,
32 * a. if the trend is THERMAL_TREND_RAISING, use higher cooling 32 * a. if the trend is THERMAL_TREND_RAISING, use higher cooling
33 * state for this trip point 33 * state for this trip point
34 * b. if the trend is THERMAL_TREND_DROPPING, use lower cooling 34 * b. if the trend is THERMAL_TREND_DROPPING, do nothing
35 * state for this trip point
36 * c. if the trend is THERMAL_TREND_RAISE_FULL, use upper limit 35 * c. if the trend is THERMAL_TREND_RAISE_FULL, use upper limit
37 * for this trip point 36 * for this trip point
38 * d. if the trend is THERMAL_TREND_DROP_FULL, use lower limit 37 * d. if the trend is THERMAL_TREND_DROP_FULL, use lower limit
@@ -94,9 +93,11 @@ static unsigned long get_target_state(struct thermal_instance *instance,
94 if (!throttle) 93 if (!throttle)
95 next_target = THERMAL_NO_TARGET; 94 next_target = THERMAL_NO_TARGET;
96 } else { 95 } else {
97 next_target = cur_state - 1; 96 if (!throttle) {
98 if (next_target > instance->upper) 97 next_target = cur_state - 1;
99 next_target = instance->upper; 98 if (next_target > instance->upper)
99 next_target = instance->upper;
100 }
100 } 101 }
101 break; 102 break;
102 case THERMAL_TREND_DROP_FULL: 103 case THERMAL_TREND_DROP_FULL: