summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2012-03-16 16:11:43 +0000
committerShaun Ruffell <sruffell@digium.com>2012-03-16 16:11:43 +0000
commit841bffe5f46978203e229baf8c1ed68829758ec1 (patch)
tree4d866fac1cfcc35710b6ddfe688ce8b093e32fa8
parent261097576ff97261eb28ac3b2982c281cc4da1ec (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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10484 Conflicts: drivers/dahdi/xpp/xpd.h git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10528 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/xpp/xpd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h
index 8eaa8dd..cf4b935 100644
--- a/drivers/dahdi/xpp/xpd.h
+++ b/drivers/dahdi/xpp/xpd.h
@@ -49,6 +49,7 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
#endif
#endif
+#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)
@@ -58,6 +59,12 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
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; \