diff options
author | Jean Pihet <jean.pihet@newoldbits.com> | 2012-06-01 19:11:06 +0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-06-25 22:24:24 +0400 |
commit | 063a5d011698950c86a01044394105605556e92c (patch) | |
tree | 2d7f3e1b5dab025013216aa4002800ac11c1eb70 /arch/arm/mach-omap2/cpuidle34xx.c | |
parent | 34059a878f5cb20652cbc937f35c925f2b378831 (diff) | |
download | linux-063a5d011698950c86a01044394105605556e92c.tar.xz |
ARM: OMAP3: PM: cpuidle: default to C1 in next_valid_state
If the next state is no found in the next_valid_state function,
fallback to the default value of C1 (which is state 0).
This prevents the use of a bogus state -1 in the rest of the cpuidle
code.
Signed-off-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/cpuidle34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/cpuidle34xx.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 207bc1c7759f..f619a928f01e 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -178,7 +178,7 @@ static int next_valid_state(struct cpuidle_device *dev, u32 mpu_deepest_state = PWRDM_POWER_RET; u32 core_deepest_state = PWRDM_POWER_RET; int idx; - int next_index = -1; + int next_index = 0; /* C1 is the default value */ if (enable_off_mode) { mpu_deepest_state = PWRDM_POWER_OFF; @@ -209,12 +209,6 @@ static int next_valid_state(struct cpuidle_device *dev, } } - /* - * C1 is always valid. - * So, no need to check for 'next_index == -1' outside - * this loop. - */ - return next_index; } |