diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-12-15 17:53:16 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-12-15 17:53:16 +0000 |
commit | aa9d79810e18599c04d1351a90ebcceff536f1f6 (patch) | |
tree | e959c1d51f5641f5866dc6ca1f71481e2cfdaa0d /drivers/dahdi/wcte12xp | |
parent | cfe2d13648c7cacda23b8f671e240cfd457bde93 (diff) |
wcte12xp: Unregister the span before any additional cleanup.
Span registration is the last step in during initialization and it
should be the first on unregistration. I also was hit by this when
looking at adding other members to the span and made the assumption that
the span was in a consistent state during unregistration.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9536 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcte12xp')
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 99267be..5f559dc 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -727,13 +727,6 @@ static void free_wc(struct t1 *wc) kfree(wc); } -static void t1_release(struct t1 *wc) -{ - dahdi_unregister(&wc->span); - t1_info(wc, "Freed a Wildcard TE12xP.\n"); - free_wc(wc); -} - static void t4_serial_setup(struct t1 *wc) { t1_info(wc, "Setting up global serial parameters for %s\n", @@ -2358,6 +2351,8 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev) if (!wc) return; + dahdi_unregister(&wc->span); + remove_sysfs_files(wc); clear_bit(INITIALIZED, &wc->bit_flags); @@ -2381,7 +2376,8 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev) } #endif - t1_release(wc); + t1_info(wc, "Freed a Wildcard TE12xP.\n"); + free_wc(wc); } static struct pci_device_id te12xp_pci_tbl[] = { |