From 25f378cfbda6e36fc18e0cf461ea8ab5d507a1ee Mon Sep 17 00:00:00 2001 From: Mahesh Sivasubramanian Date: Tue, 4 Sep 2012 18:22:51 -0600 Subject: [PATCH] msm: pm-8x60: Fix bug where device enter low power mode An incorrect ordering in the check of allowed modes, results in standalone power collapse not getting selected when the secondary cores are online. Change-Id: Idc7177b78bd0ce7563cc27afbf6c12d3bc1f9f9a Signed-off-by: Mahesh Sivasubramanian --- arch/arm/mach-msm/pm-8x60.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/arm/mach-msm/pm-8x60.c b/arch/arm/mach-msm/pm-8x60.c index 480db1f4b2e..0eec7079b46 100644 --- a/arch/arm/mach-msm/pm-8x60.c +++ b/arch/arm/mach-msm/pm-8x60.c @@ -791,6 +791,7 @@ int msm_pm_idle_prepare(struct cpuidle_device *dev, switch (mode) { case MSM_PM_SLEEP_MODE_POWER_COLLAPSE: + case MSM_PM_SLEEP_MODE_RETENTION: if (!allow) break; @@ -810,15 +811,6 @@ int msm_pm_idle_prepare(struct cpuidle_device *dev, } /* fall through */ - case MSM_PM_SLEEP_MODE_RETENTION: - if (!allow) - break; - if (num_online_cpus() > 1) { - allow = false; - break; - } - /* fall through */ - case MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT: if (!allow) break;