diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-07-02 19:34:05 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-07-02 19:34:05 +0000 |
commit | 76d241566e0f9b93eb5ce8d2e31214105ff85e08 (patch) | |
tree | 447dc8c3edd24442797e43b30b4c9b91773e03f8 /drivers/dahdi/wcb4xxp | |
parent | 11ed6c321b62580ab8ef43e57110a4a39e155f8c (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.c | 9 |
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 |