aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2013-04-23 04:54:32 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-23 07:45:22 -0400
commit80b1c1999edbba3a411335f1650f0d92da391516 (patch)
treeb02090b833a7b7fb48d21c225df48b0ccbea6804 /arch
parent554c06ba3ee29cf453fca17e9e61120b75aa476d (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/cpuidle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c
index c29c1bf5ff8b..5657d4af301c 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/arch/arm/mach-ux500/cpuidle.c
@@ -125,7 +125,7 @@ int __init ux500_idle_init(void)
125 return ret; 125 return ret;
126 } 126 }
127 127
128 for_each_online_cpu(cpu) { 128 for_each_possible(cpu) {
129 device = &per_cpu(ux500_cpuidle_device, cpu); 129 device = &per_cpu(ux500_cpuidle_device, cpu);
130 device->cpu = cpu; 130 device->cpu = cpu;
131 ret = cpuidle_register_device(device); 131 ret = cpuidle_register_device(device);
@@ -139,7 +139,7 @@ out:
139 return ret; 139 return ret;
140 140
141out_unregister: 141out_unregister:
142 for_each_online_cpu(cpu) { 142 for_each_possible_cpu(cpu) {
143 device = &per_cpu(ux500_cpuidle_device, cpu); 143 device = &per_cpu(ux500_cpuidle_device, cpu);
144 cpuidle_unregister_device(device); 144 cpuidle_unregister_device(device);
145 } 145 }