[PATCH] Fix modular cpuid.ko

With recent change, if CONFIG_HOTPLUG_CPU is disabled,
register_cpu_notifier() is not exported. And it breaked moduler msr/cpuid
(msr.c was already fixed).

We need to use register_hotcpu_notifier() now in module, instead of
register_cpu_notifier().

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by OGAWA Hirofumi and committed by Linus Torvalds b6a7c79a 912b2539

+4 -2
+4 -2
arch/i386/kernel/cpuid.c
··· 167 return err; 168 } 169 170 static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) 171 { 172 unsigned int cpu = (unsigned long)hcpu; ··· 187 { 188 .notifier_call = cpuid_class_cpu_callback, 189 }; 190 191 static int __init cpuid_init(void) 192 { ··· 210 if (err != 0) 211 goto out_class; 212 } 213 - register_cpu_notifier(&cpuid_class_cpu_notifier); 214 215 err = 0; 216 goto out; ··· 235 class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); 236 class_destroy(cpuid_class); 237 unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); 238 - unregister_cpu_notifier(&cpuid_class_cpu_notifier); 239 } 240 241 module_init(cpuid_init);
··· 167 return err; 168 } 169 170 + #ifdef CONFIG_HOTPLUG_CPU 171 static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) 172 { 173 unsigned int cpu = (unsigned long)hcpu; ··· 186 { 187 .notifier_call = cpuid_class_cpu_callback, 188 }; 189 + #endif /* !CONFIG_HOTPLUG_CPU */ 190 191 static int __init cpuid_init(void) 192 { ··· 208 if (err != 0) 209 goto out_class; 210 } 211 + register_hotcpu_notifier(&cpuid_class_cpu_notifier); 212 213 err = 0; 214 goto out; ··· 233 class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); 234 class_destroy(cpuid_class); 235 unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); 236 + unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); 237 } 238 239 module_init(cpuid_init);