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