diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2009-02-17 17:08:40 +0800 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-04-16 10:21:38 +1000 |
commit | 7a5e82cb780071541134bc14c2040a0929e5d21c (patch) | |
tree | daae266f962b90bff0238635f0d5190b9a39677d | |
parent | c254ca7ea0ba50e10b46299cdac3fc31127b3335 (diff) |
cpuhotplug: remove cpu_hotplug_init()
cpu_hotplug_init() is almost equal to a dummy function,
this patch remove it.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | include/linux/cpu.h | 5 | ||||
-rw-r--r-- | init/main.c | 1 | ||||
-rw-r--r-- | kernel/cpu.c | 11 |
3 files changed, 3 insertions, 14 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 2643d848df90..4d668e05d458 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -69,7 +69,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) int cpu_up(unsigned int cpu); void notify_cpu_starting(unsigned int cpu); -extern void cpu_hotplug_init(void); extern void cpu_maps_update_begin(void); extern void cpu_maps_update_done(void); @@ -84,10 +83,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) { } -static inline void cpu_hotplug_init(void) -{ -} - static inline void cpu_maps_update_begin(void) { } diff --git a/init/main.c b/init/main.c index 3585f073d636..7e508898c49d 100644 --- a/init/main.c +++ b/init/main.c @@ -647,7 +647,6 @@ asmlinkage void __init start_kernel(void) page_cgroup_init(); mem_init(); enable_debug_pagealloc(); - cpu_hotplug_init(); kmem_cache_init(); kmemtrace_init(); debug_objects_mem_init(); diff --git a/kernel/cpu.c b/kernel/cpu.c index 395b6974dc8d..609fae119e57 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -34,14 +34,9 @@ static struct { * an ongoing cpu hotplug operation. */ int refcount; -} cpu_hotplug; - -void __init cpu_hotplug_init(void) -{ - cpu_hotplug.active_writer = NULL; - mutex_init(&cpu_hotplug.lock); - cpu_hotplug.refcount = 0; -} +} cpu_hotplug = { + .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock), +}; #ifdef CONFIG_HOTPLUG_CPU |