diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-09-24 17:28:01 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-12-11 18:47:52 +0100 |
commit | be7fa2894eb65acc761d68fe9e209280902e2b50 (patch) | |
tree | 6749e4a669b18d2f3a8991e8cdfbfacb7add6ede | |
parent | f9a883b8c2c14e5b714e302de2b17ec765c1d4e7 (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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index c09b2b11928c..b385d857fdc1 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; |