[dahdi-commits] fjoe: freebsd/trunk r9183 - /freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 24 03:03:35 CDT 2010
Author: fjoe
Date: Tue Aug 24 03:03:33 2010
New Revision: 9183
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9183
Log:
- Define ifacelock/ifaces so that there is no symbol clash with voicebus driver.
- wctdm_get/setreg() should not be inline
Modified:
freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
Modified: freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9183&r1=9182&r2=9183
==============================================================================
--- freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ freebsd/trunk/drivers/dahdi/wctdm24xxp/base.c Tue Aug 24 03:03:33 2010
@@ -217,10 +217,8 @@
return (&wcha80000 == wc->desc) || (&wchb80000 == wc->desc);
}
-#if !defined(__FreeBSD__)
struct wctdm *ifaces[WC_MAX_IFACES];
-DECLARE_MUTEX(ifacelock);
-#endif
+struct semaphore ifacelock;
static void wctdm_release(struct wctdm *wc);
@@ -1042,12 +1040,12 @@
{
return wctdm_setreg_full(wc, card, addr, val, 1);
}
-inline int wctdm_setreg(struct wctdm *wc, int card, int addr, int val)
+int wctdm_setreg(struct wctdm *wc, int card, int addr, int val)
{
return wctdm_setreg_full(wc, card, addr, val, 0);
}
-inline int wctdm_getreg(struct wctdm *wc, int card, int addr)
+int wctdm_getreg(struct wctdm *wc, int card, int addr)
{
unsigned long flags;
int hit;
@@ -4918,6 +4916,7 @@
wc = kzalloc(sizeof(*wc), GFP_KERNEL);
if (!wc)
return -ENOMEM;
+#endif
down(&ifacelock);
/* \todo this is a candidate for removal... */
@@ -4928,7 +4927,6 @@
}
}
up(&ifacelock);
-#endif
#ifdef CONFIG_VOICEBUS_ECREFERENCE
for (i = 0; i < ARRAY_SIZE(wc->ec_reference); ++i) {
More information about the dahdi-commits
mailing list