diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2008-06-22 13:52:31 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2008-06-22 13:52:31 +0000 |
commit | 84c7897cf5a13a6bae63b49f65a6e72114dec44a (patch) | |
tree | b6aff4c10820aaf7e439969ebcd7de4f463db0a6 /drivers | |
parent | 50f029d83c725624378b16f9dd6467a424f166ed (diff) |
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
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4447 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index f9c011d..c597c2b 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -7668,6 +7668,12 @@ static int __init dahdi_init(void) { static void __exit dahdi_cleanup(void) { int 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 */ + class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 0)); /* ctl */ + class_destroy(dahdi_class); + unregister_chrdev(DAHDI_MAJOR, "dahdi"); #ifdef CONFIG_PROC_FS @@ -7680,14 +7686,6 @@ static void __exit dahdi_cleanup(void) { 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 */ - class_device_destroy(dahdi_class, MKDEV(DAHDI_MAJOR, 0)); /* ctl */ - class_destroy(dahdi_class); - - unregister_chrdev(DAHDI_MAJOR, "dahdi"); - #ifdef CONFIG_DAHDI_WATCHDOG watchdog_cleanup(); #endif |