[svn-commits] sruffell: linux/trunk r10227 - in /linux/trunk: drivers/dahdi/wctdm24xxp/ inc...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Oct 20 15:51:53 CDT 2011
Author: sruffell
Date: Thu Oct 20 15:51:49 2011
New Revision: 10227
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10227
Log:
dahdi: Add functions for determining spantype (E1/T1) to include/dahdi/kernel.h
Uses the linecompat member to determine what type of span it is. This will
allow removing T1/E1 flags from other places where the span type is stored.
This function also changes the return value from bool to int for the
inlines defined in include/dahdi/kernel.h. This is because not all
kernel versions include stdbool.h in the headers and it will conflict
with boolean values that are exported via module parameters on some
older kernels if dahdi included it globally.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Michael Spiceland <mspiceland at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
Modified:
linux/trunk/drivers/dahdi/wctdm24xxp/base.c
linux/trunk/include/dahdi/kernel.h
Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10227&r1=10226&r2=10227
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Thu Oct 20 15:51:49 2011
@@ -4401,11 +4401,6 @@
#endif
};
-static inline bool dahdi_is_digital_span(const struct dahdi_span *s)
-{
- return (s->linecompat > 0);
-}
-
static struct wctdm_chan *
wctdm_init_chan(struct wctdm *wc, struct wctdm_span *s, int chanoffset,
int channo, unsigned int card_position)
Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=10227&r1=10226&r2=10227
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Thu Oct 20 15:51:49 2011
@@ -1099,6 +1099,22 @@
ret = _dahdi_transmit(span);
local_irq_restore(flags);
return ret;
+}
+
+static inline int dahdi_is_digital_span(const struct dahdi_span *s)
+{
+ return (s->linecompat > 0);
+}
+
+static inline int dahdi_is_t1_span(const struct dahdi_span *s)
+{
+ return (s->linecompat & (DAHDI_CONFIG_D4 | DAHDI_CONFIG_ESF |
+ DAHDI_CONFIG_B8ZS)) > 0;
+}
+
+static inline int dahdi_is_e1_span(const struct dahdi_span *s)
+{
+ return dahdi_is_digital_span(s) && !dahdi_is_t1_span(s);
}
/*! Abort the buffer currently being receive with event "event" */
More information about the svn-commits
mailing list