浏览代码

x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.

Pass the number of minors when unregistering MSR and CPUID drivers.

Reported-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Dean Nelson <dnelson@redhat.com>
LKML-Reference: <20100127023722.GA22305@sgi.com>
Signed-off-by: Russ Anderson <rja@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Russ Anderson 15 年之前
父节点
当前提交
da482474b8
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      arch/x86/kernel/cpuid.c
  2. 1 1
      arch/x86/kernel/msr.c

+ 1 - 1
arch/x86/kernel/cpuid.c

@@ -229,7 +229,7 @@ static void __exit cpuid_exit(void)
 	for_each_online_cpu(cpu)
 	for_each_online_cpu(cpu)
 		cpuid_device_destroy(cpu);
 		cpuid_device_destroy(cpu);
 	class_destroy(cpuid_class);
 	class_destroy(cpuid_class);
-	unregister_chrdev(CPUID_MAJOR, "cpu/cpuid");
+	__unregister_chrdev(CPUID_MAJOR, 0, NR_CPUS, "cpu/cpuid");
 	unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
 	unregister_hotcpu_notifier(&cpuid_class_cpu_notifier);
 }
 }
 
 

+ 1 - 1
arch/x86/kernel/msr.c

@@ -285,7 +285,7 @@ static void __exit msr_exit(void)
 	for_each_online_cpu(cpu)
 	for_each_online_cpu(cpu)
 		msr_device_destroy(cpu);
 		msr_device_destroy(cpu);
 	class_destroy(msr_class);
 	class_destroy(msr_class);
-	unregister_chrdev(MSR_MAJOR, "cpu/msr");
+	__unregister_chrdev(MSR_MAJOR, 0, NR_CPUS, "cpu/msr");
 	unregister_hotcpu_notifier(&msr_class_cpu_notifier);
 	unregister_hotcpu_notifier(&msr_class_cpu_notifier);
 }
 }