diff options
Diffstat (limited to 'arch/i386/kernel/cpuid.c')
-rw-r--r-- | arch/i386/kernel/cpuid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index a8d3ecdc3897..fde8bea85cee 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -167,6 +167,7 @@ static int cpuid_class_device_create(int i) | |||
167 | return err; | 167 | return err; |
168 | } | 168 | } |
169 | 169 | ||
170 | #ifdef CONFIG_HOTPLUG_CPU | ||
170 | static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | 171 | static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) |
171 | { | 172 | { |
172 | unsigned int cpu = (unsigned long)hcpu; | 173 | unsigned int cpu = (unsigned long)hcpu; |
@@ -186,6 +187,7 @@ static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier = | |||
186 | { | 187 | { |
187 | .notifier_call = cpuid_class_cpu_callback, | 188 | .notifier_call = cpuid_class_cpu_callback, |
188 | }; | 189 | }; |
190 | #endif /* !CONFIG_HOTPLUG_CPU */ | ||
189 | 191 | ||
190 | static int __init cpuid_init(void) | 192 | static int __init cpuid_init(void) |
191 | { | 193 | { |
@@ -208,7 +210,7 @@ static int __init cpuid_init(void) | |||
208 | if (err != 0) | 210 | if (err != 0) |
209 | goto out_class; | 211 | goto out_class; |
210 | } | 212 | } |
211 | register_cpu_notifier(&cpuid_class_cpu_notifier); | 213 | register_hotcpu_notifier(&cpuid_class_cpu_notifier); |
212 | 214 | ||
213 | err = 0; | 215 | err = 0; |
214 | goto out; | 216 | goto out; |
@@ -233,7 +235,7 @@ static void __exit cpuid_exit(void) | |||
233 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); | 235 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); |
234 | class_destroy(cpuid_class); | 236 | class_destroy(cpuid_class); |
235 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); | 237 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); |
236 | unregister_cpu_notifier(&cpuid_class_cpu_notifier); | 238 | unregister_hotcpu_notifier(&cpuid_class_cpu_notifier); |
237 | } | 239 | } |
238 | 240 | ||
239 | module_init(cpuid_init); | 241 | module_init(cpuid_init); |