summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2014-09-24 17:28:01 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2015-01-15 13:26:07 +0100
commit8c872c8a0c7684ef77c2b4dd8d886edac3560f5e (patch)
treea7f5313ee48bbb08a971154815077355d86c735e
parent30e2361976110c0cf09411a68bade4bdbd2d2e4e (diff)
cpuidle: Don't use the exit latency to find the deepest state
In the code, the convention is the deeper an idle is, the greater the exit latency is. No need to check the exit latency between the states. Furthermore, that will allow in the next patches to factor out this loop. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--drivers/cpuidle/cpuidle.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index 639f54b62717..36c3711058a4 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -84,17 +84,15 @@ void cpuidle_use_deepest_state(bool enable)
static int cpuidle_find_deepest_state(struct cpuidle_driver *drv,
struct cpuidle_device *dev)
{
- unsigned int latency_req = 0;
int i, ret = -1;
for (i = 0; i < drv->state_count; i++) {
struct cpuidle_state *s = &drv->states[i];
struct cpuidle_state_usage *su = &dev->states_usage[i];
- if (s->disabled || su->disable || s->exit_latency <= latency_req)
+ if (s->disabled || su->disable)
continue;
- latency_req = s->exit_latency;
ret = i;
}
return ret;