summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2006-06-27 02:54:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 17:32:41 -0700
commit65edc68c345cbe21d0b0375c3452a3ed5e322868 (patch)
tree07961d63cdacf95355a8db471c6ff4e321ca94fd /include/linux
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 'include/linux')
-rw-r--r--include/linux/cpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index b23bf1c8addc..cdfe471a70a1 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -41,7 +41,13 @@ struct notifier_block;
#ifdef CONFIG_SMP
/* Need to know about CPUs going up/down? */
extern int register_cpu_notifier(struct notifier_block *nb);
+#ifdef CONFIG_HOTPLUG_CPU
extern void unregister_cpu_notifier(struct notifier_block *nb);
+#else
+static inline void unregister_cpu_notifier(struct notifier_block *nb)
+{
+}
+#endif
extern int current_in_cpu_hotplug(void);
int cpu_up(unsigned int cpu);