From 3b0776bc889dff3994b0500ceabd3256f6b8e846 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 16 Mar 2012 17:08:00 +0000 Subject: 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 Acked-by: Tzafrir Cohen 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.4@10532 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/xpp/xpd.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h index 04d6713..580a799 100644 --- a/drivers/dahdi/xpp/xpd.h +++ b/drivers/dahdi/xpp/xpd.h @@ -57,6 +57,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) @@ -66,6 +67,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; \ -- cgit v1.2.3