diff options
Diffstat (limited to 'arch/i386/kernel/msr.c')
-rw-r--r-- | arch/i386/kernel/msr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index 4eae03d3ade5..d535cdbbfd25 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -250,7 +250,9 @@ static int msr_class_device_create(int i) | |||
250 | return err; | 250 | return err; |
251 | } | 251 | } |
252 | 252 | ||
253 | static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 253 | #ifdef CONFIG_HOTPLUG_CPU |
254 | static int msr_class_cpu_callback(struct notifier_block *nfb, | ||
255 | unsigned long action, void *hcpu) | ||
254 | { | 256 | { |
255 | unsigned int cpu = (unsigned long)hcpu; | 257 | unsigned int cpu = (unsigned long)hcpu; |
256 | 258 | ||
@@ -269,6 +271,7 @@ static struct notifier_block __cpuinitdata msr_class_cpu_notifier = | |||
269 | { | 271 | { |
270 | .notifier_call = msr_class_cpu_callback, | 272 | .notifier_call = msr_class_cpu_callback, |
271 | }; | 273 | }; |
274 | #endif | ||
272 | 275 | ||
273 | static int __init msr_init(void) | 276 | static int __init msr_init(void) |
274 | { | 277 | { |
@@ -291,7 +294,7 @@ static int __init msr_init(void) | |||
291 | if (err != 0) | 294 | if (err != 0) |
292 | goto out_class; | 295 | goto out_class; |
293 | } | 296 | } |
294 | register_cpu_notifier(&msr_class_cpu_notifier); | 297 | register_hotcpu_notifier(&msr_class_cpu_notifier); |
295 | 298 | ||
296 | err = 0; | 299 | err = 0; |
297 | goto out; | 300 | goto out; |
@@ -314,7 +317,7 @@ static void __exit msr_exit(void) | |||
314 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); | 317 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
315 | class_destroy(msr_class); | 318 | class_destroy(msr_class); |
316 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 319 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
317 | unregister_cpu_notifier(&msr_class_cpu_notifier); | 320 | unregister_hotcpu_notifier(&msr_class_cpu_notifier); |
318 | } | 321 | } |
319 | 322 | ||
320 | module_init(msr_init); | 323 | module_init(msr_init); |