summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/xpp_dahdi.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-01-30 18:13:39 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2011-01-30 18:13:39 +0000
commit524aa2ad320cd79aa3be339098076c0abe9fb276 (patch)
tree913f6ea14d006bcdebabe80f91e3da8d05fce473 /drivers/dahdi/xpp/xpp_dahdi.c
parent210720d9e0efb8db37a5171a8e755997d07eda73 (diff)
xpp: use phonedev_cleanup() instead of inline code
Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9711 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r--drivers/dahdi/xpp/xpp_dahdi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c
index c587219..ba36c80 100644
--- a/drivers/dahdi/xpp/xpp_dahdi.c
+++ b/drivers/dahdi/xpp/xpp_dahdi.c
@@ -67,6 +67,8 @@ static DEF_PARM_BOOL(prefmaster, 0, 0644, "Do we want to be dahdi preferred sync
#include "dahdi_debug.h"
+static void phonedev_cleanup(xpd_t *xpd);
+
#ifdef DEBUG_SYNC_PARPORT
/*
* Use parallel port to sample our PCM sync and diagnose quality and
@@ -238,7 +240,6 @@ err:
void xpd_free(xpd_t *xpd)
{
xbus_t *xbus = NULL;
- unsigned int x;
if(!xpd)
return;
@@ -251,10 +252,7 @@ void xpd_free(xpd_t *xpd)
XPD_DBG(DEVICES, xpd, "\n");
xpd_proc_remove(xbus, xpd);
xbus_xpd_unbind(xbus, xpd);
- for (x = 0; x < PHONEDEV(xpd).channels; x++) {
- if (PHONEDEV(xpd).chans[x])
- KZFREE(PHONEDEV(xpd).chans[x]);
- }
+ phonedev_cleanup(xpd);
KZFREE(xpd);
DBG(DEVICES, "refcount_xbus=%d\n", refcount_xbus(xbus));
/*