mirror of https://gitee.com/openkylin/linux.git
ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu
All the drivers are using, in their initialization function, the for_each_possible_cpu macro. Using for_each_online_cpu means the driver must handle the initialization of the cpuidle device when a cpu is up which is not the case here. Change the macro to for_each_possible_cpu as that fix the hotplug initialization and make the initialization routine consistent with the rest of the code in the different drivers. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
554c06ba3e
commit
80b1c1999e
|
@ -125,7 +125,7 @@ int __init ux500_idle_init(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
for_each_possible(cpu) {
|
||||
device = &per_cpu(ux500_cpuidle_device, cpu);
|
||||
device->cpu = cpu;
|
||||
ret = cpuidle_register_device(device);
|
||||
|
@ -139,7 +139,7 @@ int __init ux500_idle_init(void)
|
|||
return ret;
|
||||
|
||||
out_unregister:
|
||||
for_each_online_cpu(cpu) {
|
||||
for_each_possible_cpu(cpu) {
|
||||
device = &per_cpu(ux500_cpuidle_device, cpu);
|
||||
cpuidle_unregister_device(device);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue