summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2013-03-25 15:35:04 +0530
committerKevin Hilman <khilman@linaro.org>2013-04-09 09:44:49 -0700
commitdbd1ba6a62408520e5c7a024b521af14e71b2987 (patch)
treea14c6cf92fa2b2fd7af48269ddd725392f218ef4
parent0d97558901c446a989de202a5d9ae94ec53644e5 (diff)
ARM: OMAP4: CPUidle: Avoid double idle driver registration
OMAP4 CPUidle driver registration call is under a loop which leads to calling cpuidle_register_driver twice which is not intended. Fix it by moving the driver registration outside the loop. Reported-by: Nishanth Menon <nm@ti.com> Acked-by: Nishanth Menon <nm@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index f4b1b234939e..72c5407fdd12 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -222,14 +222,14 @@ int __init omap4_idle_init(void)
if (!cpu_clkdm[0] || !cpu_clkdm[1])
return -ENODEV;
+ cpuidle_register_driver(&omap4_idle_driver);
+
for_each_cpu(cpu_id, cpu_online_mask) {
dev = &per_cpu(omap4_idle_dev, cpu_id);
dev->cpu = cpu_id;
#ifdef CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED
dev->coupled_cpus = *cpu_online_mask;
#endif
- cpuidle_register_driver(&omap4_idle_driver);
-
if (cpuidle_register_device(dev)) {
pr_err("%s: CPUidle register failed\n", __func__);
return -EIO;