backports: avoid module parameter warnings
authorJohannes Berg <johannes.berg@intel.com>
Sat, 13 Apr 2013 13:28:38 +0000 (15:28 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 15 Apr 2013 09:32:48 +0000 (11:32 +0200)
On old kernels, boolean module parameters had to be int.
When we backport, they're bool, and thus cause warnings.
Suppress the warnings by redefining the parameter check,
it's not entirely clear that it'll do the right thing
though?

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/backport-include/linux/module.h

index 6bddc76bfbcb3a6afe99e836232d2bbae49333f5..82c96bd6b85e6b01b0f7c3686bf5eacac44b4990 100644 (file)
@@ -59,4 +59,9 @@ extern void backport_dependency_symbol(void);
        }                                                               \
        void cleanup_module(void) __attribute__((alias("__exit_compat")));
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
+#undef param_check_bool
+#define param_check_bool(name, p) __param_check(name, p, bool)
+#endif
+
 #endif /* __BACKPORT_LINUX_MODULE_H */