[svn-commits] kpfleming: linux/trunk r4447 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jun 22 08:52:31 CDT 2008


Author: kpfleming
Date: Sun Jun 22 08:52:31 2008
New Revision: 4447

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4447
Log:
fixing damage caused by r4445... the unregister_chrdev() call was *not* removed in r4436, it was moved to the top of the function so that we remove all possible paths opening devices provided by this module as early as possible in the unload process. however, while fixing this i realized that the class_unregister_device() calls need to happen before unregister_chrdev(), so those are now at the top of the function as well

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=4447&r1=4446&r2=4447
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Sun Jun 22 08:52:31 2008
@@ -7668,18 +7668,6 @@
 static void __exit dahdi_cleanup(void) {
 	int x;
 
-	unregister_chrdev(DAHDI_MAJOR, "dahdi");
-
-#ifdef CONFIG_PROC_FS
-	remove_proc_entry("dahdi", NULL);
-#endif
-
-	module_printk(KERN_INFO, "Telephony Interface Unloaded\n");
-	for (x = 0; x < DAHDI_TONE_ZONE_MAX; x++) {
-		if (tone_zones[x])
-			kfree(tone_zones[x]);
-	}
-
 	class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 253)); /* timer */
 	class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 254)); /* channel */
 	class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 255)); /* pseudo */
@@ -7688,6 +7676,16 @@
 
 	unregister_chrdev(DAHDI_MAJOR, "dahdi");
 
+#ifdef CONFIG_PROC_FS
+	remove_proc_entry("dahdi", NULL);
+#endif
+
+	module_printk(KERN_INFO, "Telephony Interface Unloaded\n");
+	for (x = 0; x < DAHDI_TONE_ZONE_MAX; x++) {
+		if (tone_zones[x])
+			kfree(tone_zones[x]);
+	}
+
 #ifdef CONFIG_DAHDI_WATCHDOG
 	watchdog_cleanup();
 #endif




More information about the svn-commits mailing list