Commit dbd1ba6a authored by Santosh Shilimkar's avatar Santosh Shilimkar Committed by Kevin Hilman
Browse files

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: default avatarNishanth Menon <>
Acked-by: default avatarNishanth Menon <>
Signed-off-by: default avatarSantosh Shilimkar <>
Signed-off-by: default avatarKevin Hilman <>
parent 0d975589
......@@ -222,14 +222,14 @@ int __init omap4_idle_init(void)
if (!cpu_clkdm[0] || !cpu_clkdm[1])
return -ENODEV;
for_each_cpu(cpu_id, cpu_online_mask) {
dev = &per_cpu(omap4_idle_dev, cpu_id);
dev->cpu = cpu_id;
dev->coupled_cpus = *cpu_online_mask;
if (cpuidle_register_device(dev)) {
pr_err("%s: CPUidle register failed\n", __func__);
return -EIO;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment