[svn-commits] fjoe: freebsd/trunk r10725 - /freebsd/trunk/bsd-kmod/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 27 14:45:54 CDT 2012


Author: fjoe
Date: Thu Sep 27 14:45:50 2012
New Revision: 10725

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10725
Log:
Make bsd-compat.c non-DAHDI-specific.

Modified:
    freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
    freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c

Modified: freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c?view=diff&rev=10725&r1=10724&r2=10725
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c (original)
+++ freebsd/trunk/bsd-kmod/dahdi/bsd-compat.c Thu Sep 27 14:45:50 2012
@@ -29,12 +29,12 @@
  * $Id$
  */
 
-#include <dahdi/kernel.h>
 #include <asm/atomic.h>
 #include <linux/firmware.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/kmod.h>
+#include <linux/kref.h>
 #include <linux/module.h>
 #include <linux/ppp_defs.h>
 #include <linux/sched.h>
@@ -48,9 +48,6 @@
 #include <sys/refcount.h>
 #include <sys/sbuf.h>
 
-SYSCTL_NODE(, OID_AUTO, dahdi, CTLFLAG_RW, 0, "DAHDI");
-SYSCTL_NODE(_dahdi, OID_AUTO, echocan, CTLFLAG_RW, 0, "DAHDI Echo Cancelers");
-
 /*
  * Tasklet API
  */
@@ -195,8 +192,8 @@
 void
 init_completion(struct completion *c)
 {
-	cv_init(&c->cv, "DAHDI completion cv");
-	mtx_init(&c->lock, "DAHDI completion lock", "condvar", MTX_DEF);
+	cv_init(&c->cv, "linux completion cv");
+	mtx_init(&c->lock, "linux completion lock", "condvar", MTX_DEF);
 	c->done = 0;
 }
 
@@ -249,7 +246,7 @@
 void
 _linux_sema_init(struct semaphore *s, int value)
 {
-	sema_init(&s->sema, value, "DAHDI semaphore");
+	sema_init(&s->sema, value, "linux semaphore");
 }
 
 void
@@ -332,13 +329,13 @@
 	int res;
 	struct workqueue_struct *wq;
 
-	wq = malloc(sizeof(*wq), M_DAHDI, M_NOWAIT);
+	wq = malloc(sizeof(*wq), M_LINUX, M_NOWAIT);
 	if (wq == NULL)
 		return NULL;
 
 	wq->tq = taskqueue_create_fast(name, M_NOWAIT, taskqueue_thread_enqueue, &wq->tq);
 	if (wq->tq == NULL) {
-		free(wq, M_DAHDI);
+		free(wq, M_LINUX);
 		return NULL;
 	}
 
@@ -355,7 +352,7 @@
 destroy_workqueue(struct workqueue_struct *wq)
 {
 	taskqueue_free(wq->tq);
-	free(wq, M_DAHDI);
+	free(wq, M_LINUX);
 }
 
 static void

Modified: freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c?view=diff&rev=10725&r1=10724&r2=10725
==============================================================================
--- freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c (original)
+++ freebsd/trunk/bsd-kmod/dahdi/dahdi-bsd.c Thu Sep 27 14:45:50 2012
@@ -37,6 +37,9 @@
 #include <dev/pci/pcivar.h>
 
 MALLOC_DEFINE(M_DAHDI, "dahdi", "DAHDI interface data structures");
+
+SYSCTL_NODE(, OID_AUTO, dahdi, CTLFLAG_RW, 0, "DAHDI");
+SYSCTL_NODE(_dahdi, OID_AUTO, echocan, CTLFLAG_RW, 0, "DAHDI Echo Cancelers");
 
 void
 rlprintf(int pps, const char *fmt, ...)




More information about the svn-commits mailing list