]> git.neil.brown.name Git - history.git/commitdiff
x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.
authorRuss Anderson <rja@sgi.com>
Wed, 27 Jan 2010 02:37:22 +0000 (20:37 -0600)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 27 Jan 2010 07:52:38 +0000 (23:52 -0800)
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>
arch/x86/kernel/cpuid.c
arch/x86/kernel/msr.c

index cb27fd6136c9bec099b0a944ee59a8425d39d09c..83e5e628de73a7234f90c2f7130e98fa4df4fe4e 100644 (file)
@@ -229,7 +229,7 @@ static void __exit cpuid_exit(void)
        for_each_online_cpu(cpu)
                cpuid_device_destroy(cpu);
        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);
 }
 
index 4bd93c9b2b2716d86367c41631ffa1a0c4625a83..206735ac8cbdbaf053e039fb5f6e4fb5c50a5f8a 100644 (file)
@@ -285,7 +285,7 @@ static void __exit msr_exit(void)
        for_each_online_cpu(cpu)
                msr_device_destroy(cpu);
        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);
 }