summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcb4xxp
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-07-02 19:34:05 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-07-02 19:34:05 +0000
commitf14181e6503f95692697f2f89ff53baa8c9e976f (patch)
tree447dc8c3edd24442797e43b30b4c9b91773e03f8 /drivers/dahdi/wcb4xxp
parentd96790d23d927c553c028c665ffcda9fc0c427fb (diff)
wcb4xxp: Extra bit macros that a needed for kernels < 2.6.24
Macros borrowed from xpp/ . git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6813 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcb4xxp')
-rw-r--r--drivers/dahdi/wcb4xxp/base.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c
index 8bf035f..cd82f2f 100644
--- a/drivers/dahdi/wcb4xxp/base.c
+++ b/drivers/dahdi/wcb4xxp/base.c
@@ -47,6 +47,15 @@
#include "wcb4xxp.h"
+#ifndef BIT /* added in 2.6.24 */
+#define BIT(i) (1UL << (i))
+#endif
+#define BIT_SET(x, i) ((x) |= BIT(i))
+#define BIT_CLR(x, i) ((x) &= ~BIT(i))
+#define IS_SET(x, i) (((x) & BIT(i)) != 0)
+#define BITMASK(i) (((u64)1 << (i)) - 1)
+
+
#if (DAHDI_CHUNKSIZE != 8)
#error Sorry, wcb4xxp does not support chunksize != 8
#endif