X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Fmsr.c;h=7a328230e540f8b073e5d0306f457a1a9bffbc28;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=d535cdbbfd256f5087480f7a75eebc640e9cebc3;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index d535cdbbf..7a328230e 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c @@ -24,6 +24,7 @@ */ #include +#include #include #include @@ -250,9 +251,7 @@ static int msr_class_device_create(int i) return err; } -#ifdef CONFIG_HOTPLUG_CPU -static int msr_class_cpu_callback(struct notifier_block *nfb, - unsigned long action, void *hcpu) +static int msr_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { unsigned int cpu = (unsigned long)hcpu; @@ -267,11 +266,10 @@ static int msr_class_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block __cpuinitdata msr_class_cpu_notifier = +static struct notifier_block msr_class_cpu_notifier = { .notifier_call = msr_class_cpu_callback, }; -#endif static int __init msr_init(void) { @@ -294,7 +292,7 @@ static int __init msr_init(void) if (err != 0) goto out_class; } - register_hotcpu_notifier(&msr_class_cpu_notifier); + register_cpu_notifier(&msr_class_cpu_notifier); err = 0; goto out; @@ -317,7 +315,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_hotcpu_notifier(&msr_class_cpu_notifier); + unregister_cpu_notifier(&msr_class_cpu_notifier); } module_init(msr_init);