From be6b5a3505fa0cd54c3b5959a39293f47c648980 Mon Sep 17 00:00:00 2001 From: Chandra Seetharaman Date: Sun, 30 Jul 2006 03:03:37 -0700 Subject: [PATCH] cpu hotplug: use hotplug version of registration in late inits Use hotplug version of register_cpu_notifier in late init functions. Signed-off-by: Chandra Seetharaman Cc: "Luck, Tony" Cc: Martin Schwidefsky Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/ia64/kernel/palinfo.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'arch/ia64/kernel/palinfo.c') diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c index 3f5bac59209..ab5b52413e9 100644 --- a/arch/ia64/kernel/palinfo.c +++ b/arch/ia64/kernel/palinfo.c @@ -958,9 +958,9 @@ remove_palinfo_proc_entries(unsigned int hcpu) } } -static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb, - unsigned long action, - void *hcpu) +#ifdef CONFIG_HOTPLUG_CPU +static int palinfo_cpu_callback(struct notifier_block *nfb, + unsigned long action, void *hcpu) { unsigned int hotcpu = (unsigned long)hcpu; @@ -968,20 +968,19 @@ static int __cpuinit palinfo_cpu_callback(struct notifier_block *nfb, case CPU_ONLINE: create_palinfo_proc_entries(hotcpu); break; -#ifdef CONFIG_HOTPLUG_CPU case CPU_DEAD: remove_palinfo_proc_entries(hotcpu); break; -#endif } return NOTIFY_OK; } -static struct notifier_block __cpuinitdata palinfo_cpu_notifier = +static struct notifier_block palinfo_cpu_notifier = { .notifier_call = palinfo_cpu_callback, .priority = 0, }; +#endif static int __init palinfo_init(void) @@ -1020,7 +1019,7 @@ palinfo_exit(void) /* * Unregister from cpu notifier callbacks */ - unregister_cpu_notifier(&palinfo_cpu_notifier); + unregister_hotcpu_notifier(&palinfo_cpu_notifier); } module_init(palinfo_init); -- cgit v1.2.3