Skip to contentSkip to conversation

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

bigfix Russ Anderson 1 participant 2 messages Jan 27, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

---
While code reviewing the patch "x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers", Dean noticed the number of minors not being passed when unregistering in the *_exit functions.

 arch/x86/kernel/cpuid.c |    2 +-
 arch/x86/kernel/msr.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpuid.c +1 -1
Index: linux/arch/x86/kernel/cpuid.c
===================================================================
@@ -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);
 }
 
arch/x86/kernel/msr.c +1 -1
Index: linux/arch/x86/kernel/msr.c
===================================================================
@@ -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);
 }
 
Signature · 2 lines
Russ Anderson, OS RAS/Partitioning Project Lead  
SGI - Silicon Graphics Inc          [email protected]
#1 lore raw
Commit-ID:  da482474b8396e1a099c37ffc6541b78775aedb4
Gitweb:     http://git.kernel.org/tip/da482474b8396e1a099c37ffc6541b78775aedb4
Author:     Russ Anderson <[email protected]>
AuthorDate: Tue, 26 Jan 2010 20:37:22 -0600
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Tue, 26 Jan 2010 23:52:38 -0800

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.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/cpuid.c |    2 +-
 arch/x86/kernel/msr.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpuid.c +1 -1
index cb27fd6..83e5e62 100644
@@ -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);
 }
 
arch/x86/kernel/msr.c +1 -1
index 4bd93c9..206735a 100644
@@ -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);
 }