mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
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 <[email protected]> Acked-by: Nishanth Menon <[email protected]> Signed-off-by: Santosh Shilimkar <[email protected]> Signed-off-by: Kevin Hilman <[email protected]>
This commit is contained in:
parent
0d97558901
commit
dbd1ba6a62
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue