summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2012-03-15 15:41:36 +0000
committerShaun Ruffell <sruffell@digium.com>2012-03-15 15:41:36 +0000
commit7120b0935afaa6e1a6492c4f1d6fcae5556e5404 (patch)
tree766a55815d673d9e81c86ff134ec546aae04011b
parent24fbb7f7b5cb7e3e8eb2b6b6c013738f0eb0e5b9 (diff)
xpp: Use 'bool' type for boolean module parameters on kernel versions >= 2.6.31.
Eliminates warnings that are a result of upstream commit 72db395ffa "module_param: check that bool parameters really are bool." Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10484 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/xpd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h
index f341e18..2f505ae 100644
--- a/drivers/dahdi/xpp/xpd.h
+++ b/drivers/dahdi/xpp/xpd.h
@@ -42,6 +42,8 @@
#include <dahdi/kernel.h>
#ifdef __KERNEL__
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
/*
* FIXME: Kludge for 2.6.19
* bool is now defined as a proper boolean type (gcc _Bool)
@@ -51,6 +53,12 @@
int name = init; \
module_param(name, bool, perm); \
MODULE_PARM_DESC(name, desc " [default " #init "]")
+#else
+#define DEF_PARM_BOOL(name, init, perm, desc) \
+ bool name = init; \
+ module_param(name, bool, perm); \
+ MODULE_PARM_DESC(name, desc " [default " #init "]")
+#endif
#define DEF_PARM(type, name, init, perm, desc) \
type name = init; \