The following commit has been merged in the master branch: commit 4f3b54d989c4030e48834517363315d8619807f5 Author: Martin Hundebøll martin@hundeboll.net Date: Tue Apr 24 10:28:31 2012 +0200
batman-adv: make __alloc_percpu 2.6.29 compatible
In 2.6.29, __alloc_percpu doesn't take a align argument, so ignore this.
Signed-off-by: Martin Hundebøll martin@hundeboll.net
diff --git a/compat.h b/compat.h index 1cf5210..2dc41b1 100644 --- a/compat.h +++ b/compat.h @@ -27,6 +27,28 @@
#include <linux/version.h> /* LINUX_VERSION_CODE */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) + +#undef __alloc_percpu +#define __alloc_percpu(size, align) \ + percpu_alloc_mask((size), GFP_KERNEL, cpu_possible_map) + +#endif /* < KERNEL_VERSION(2, 6, 30) */ + + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) + +#define __compat__module_param_call(p1, p2, p3, p4, p5, p6, p7) \ + __module_param_call(p1, p2, p3, p4, p5, p7) + +#else + +#define __compat__module_param_call(p1, p2, p3, p4, p5, p6, p7) \ + __module_param_call(p1, p2, p3, p4, p5, p6, p7) + +#endif /* < KERNEL_VERSION(2, 6, 31) */ + + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)) #include <linux/autoconf.h> #else @@ -65,19 +87,6 @@
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31) - -#define __compat__module_param_call(p1, p2, p3, p4, p5, p6, p7) \ - __module_param_call(p1, p2, p3, p4, p5, p7) - -#else - -#define __compat__module_param_call(p1, p2, p3, p4, p5, p6, p7) \ - __module_param_call(p1, p2, p3, p4, p5, p6, p7) - -#endif /* < KERNEL_VERSION(2, 6, 31) */ - - #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
#define __rcu