Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[sfrench/cifs-2.6.git] / drivers / thermal / step_wise.c
index be95826631b72cfffb9bf5187e530c71fda2c130..ee047ca43084dcce0e4a0704c2a30d821f076a7c 100644 (file)
@@ -31,8 +31,7 @@
  * If the temperature is higher than a trip point,
  *    a. if the trend is THERMAL_TREND_RAISING, use higher cooling
  *       state for this trip point
- *    b. if the trend is THERMAL_TREND_DROPPING, use lower cooling
- *       state for this trip point
+ *    b. if the trend is THERMAL_TREND_DROPPING, do nothing
  *    c. if the trend is THERMAL_TREND_RAISE_FULL, use upper limit
  *       for this trip point
  *    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,
                        if (!throttle)
                                next_target = THERMAL_NO_TARGET;
                } else {
-                       next_target = cur_state - 1;
-                       if (next_target > instance->upper)
-                               next_target = instance->upper;
+                       if (!throttle) {
+                               next_target = cur_state - 1;
+                               if (next_target > instance->upper)
+                                       next_target = instance->upper;
+                       }
                }
                break;
        case THERMAL_TREND_DROP_FULL: