Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374552
b: refs/heads/master
c: e79fe64
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Bresticker authored and Zhang Rui committed Apr 11, 2013
1 parent 07d7778 commit b97894c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8837295a73f3500b32e18f9862c7bdde0b958648
refs/heads/master: e79fe642cc21ac922226b5ea9b7975bf329d4e7a
10 changes: 8 additions & 2 deletions trunk/drivers/thermal/step_wise.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ static unsigned long get_target_state(struct thermal_instance *instance,

switch (trend) {
case THERMAL_TREND_RAISING:
if (throttle)
if (throttle) {
cur_state = cur_state < instance->upper ?
(cur_state + 1) : instance->upper;
if (cur_state < instance->lower)
cur_state = instance->lower;
}
break;
case THERMAL_TREND_RAISE_FULL:
if (throttle)
Expand All @@ -71,8 +74,11 @@ static unsigned long get_target_state(struct thermal_instance *instance,
if (cur_state == instance->lower) {
if (!throttle)
cur_state = -1;
} else
} else {
cur_state -= 1;
if (cur_state > instance->upper)
cur_state = instance->upper;
}
break;
case THERMAL_TREND_DROP_FULL:
if (cur_state == instance->lower) {
Expand Down

0 comments on commit b97894c

Please sign in to comment.