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