[svn-commits] tzafrir: linux/trunk r9711 - /linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jan 30 12:13:43 CST 2011


Author: tzafrir
Date: Sun Jan 30 12:13:39 2011
New Revision: 9711

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9711
Log:
xpp: use phonedev_cleanup() instead of inline code

Signed-off-by: Oron Peled <oron at actcom.co.il>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c

Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=9711&r1=9710&r2=9711
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Sun Jan 30 12:13:39 2011
@@ -67,6 +67,8 @@
 
 #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 @@
 void xpd_free(xpd_t *xpd)
 {
 	xbus_t		*xbus = NULL;
-	unsigned int	x;
 
 	if(!xpd)
 		return;
@@ -251,10 +252,7 @@
 	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));
 	/*




More information about the svn-commits mailing list