X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Fmsr.c;h=d535cdbbfd256f5087480f7a75eebc640e9cebc3;hb=22a3e233ca08a2ddc949ba1ae8f6e16ec7ef1a13;hp=d022cb8fd7251ccc79e3eeb89a8210e5f92b85d1;hpb=3aa590c6b7c89d844f81c2e96f295cf2c6967773;p=powerpc.git diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index d022cb8fd7..d535cdbbfd 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c @@ -24,7 +24,6 @@ */ #include -#include #include #include @@ -251,7 +250,9 @@ static int msr_class_device_create(int i) return err; } -static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) +#ifdef CONFIG_HOTPLUG_CPU +static int msr_class_cpu_callback(struct notifier_block *nfb, + unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -270,6 +271,7 @@ static struct notifier_block __cpuinitdata msr_class_cpu_notifier = { .notifier_call = msr_class_cpu_callback, }; +#endif static int __init msr_init(void) { @@ -292,7 +294,7 @@ static int __init msr_init(void) if (err != 0) goto out_class; } - register_cpu_notifier(&msr_class_cpu_notifier); + register_hotcpu_notifier(&msr_class_cpu_notifier); err = 0; goto out; @@ -315,7 +317,7 @@ static void __exit msr_exit(void) class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); class_destroy(msr_class); unregister_chrdev(MSR_MAJOR, "cpu/msr"); - unregister_cpu_notifier(&msr_class_cpu_notifier); + unregister_hotcpu_notifier(&msr_class_cpu_notifier); } module_init(msr_init);