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)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:03:02 +0000 (15:03 -0800)
commit da482474b8396e1a099c37ffc6541b78775aedb4 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/cpuid.c
arch/x86/kernel/msr.c

index f8590c50942342cc923a9faa2661c7e1f296acd4..0c91110219c00217f9c6e0b9a359e52a28454a3a 100644 (file)
@@ -234,7 +234,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 b42e63baa8e4fc15e4fc81aee214558d6efc3df7..5eaeb5e35c497b237fa385f57a432f80d7936ac3 100644 (file)
@@ -290,7 +290,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);
 }