aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_stats.c
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2006-06-27 05:54:08 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 20:32:41 -0400
commit65edc68c345cbe21d0b0375c3452a3ed5e322868 (patch)
tree07961d63cdacf95355a8db471c6ff4e321ca94fd /drivers/cpufreq/cpufreq_stats.c
parent054cc8a2d808822dadf488a61729e3e550f114c4 (diff)
[PATCH] cpu hotplug: make [un]register_cpu_notifier init time only
CPUs come online only at init time (unless CONFIG_HOTPLUG_CPU is defined). So, cpu_notifier functionality need to be available only at init time. This patch makes register_cpu_notifier() available only at init time, unless CONFIG_HOTPLUG_CPU is defined. This patch exports register_cpu_notifier() and unregister_cpu_notifier() only if CONFIG_HOTPLUG_CPU is defined. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Cc: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq_stats.c')
-rw-r--r--drivers/cpufreq/cpufreq_stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index c576c0b3f452..145061b8472a 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -350,7 +350,7 @@ __init cpufreq_stats_init(void)
350 return ret; 350 return ret;
351 } 351 }
352 352
353 register_cpu_notifier(&cpufreq_stat_cpu_notifier); 353 register_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
354 lock_cpu_hotplug(); 354 lock_cpu_hotplug();
355 for_each_online_cpu(cpu) { 355 for_each_online_cpu(cpu) {
356 cpufreq_stat_cpu_callback(&cpufreq_stat_cpu_notifier, CPU_ONLINE, 356 cpufreq_stat_cpu_callback(&cpufreq_stat_cpu_notifier, CPU_ONLINE,
@@ -368,7 +368,7 @@ __exit cpufreq_stats_exit(void)
368 CPUFREQ_POLICY_NOTIFIER); 368 CPUFREQ_POLICY_NOTIFIER);
369 cpufreq_unregister_notifier(&notifier_trans_block, 369 cpufreq_unregister_notifier(&notifier_trans_block,
370 CPUFREQ_TRANSITION_NOTIFIER); 370 CPUFREQ_TRANSITION_NOTIFIER);
371 unregister_cpu_notifier(&cpufreq_stat_cpu_notifier); 371 unregister_hotcpu_notifier(&cpufreq_stat_cpu_notifier);
372 lock_cpu_hotplug(); 372 lock_cpu_hotplug();
373 for_each_online_cpu(cpu) { 373 for_each_online_cpu(cpu) {
374 cpufreq_stat_cpu_callback(&cpufreq_stat_cpu_notifier, CPU_DEAD, 374 cpufreq_stat_cpu_callback(&cpufreq_stat_cpu_notifier, CPU_DEAD,