summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-03-26 15:12:58 -0700
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-03-26 15:23:01 -0700
commit8095d14fa270ccc361fbf7e9333beaa37553d699 (patch)
treefe909f6f3fde9315f3526fa2120f5948482f7081
parentbfd429ddd3bf54d7d6cd5d9ec64fca174e3c53eb (diff)
compat: fix cordic backport header
mcgrof@frijol ~/linux-next (git::master)$ git describe --contains \ 10f8113ecb76eea72f96c7cfb72d7fed7c282565 v3.1-rc1~24^2~10^2^2~515 The cordic backport added the cordic library and the cordic header. It correctly only compiled cordic for kernels < 3.1 but the header however was left intact. This is non-issue until cordic itself gets updated with some new features or changes but also an issue was created when we switched the backort namespace. The issue is that the header declares backport_cordic_calc_iq() exists while it actually is not compiled on newer kernels. Fix this by doing the kernel revision check on the backported header, otherwise use #include_next to get the next header, the proper kernel header. This does not have to be added to the older releases given that the header is the same for older kernels, and we are not exporting the symbol twice given that the proper check was already in place for cordic.c. == ckmake-report.log == 1 2.6.24 [ OK ] 2 2.6.25 [ OK ] 3 2.6.26 [ OK ] 4 2.6.27 [ OK ] 5 2.6.28 [ OK ] 6 2.6.29 [ OK ] 7 2.6.30 [ OK ] 8 2.6.31 [ OK ] 9 2.6.32 [ OK ] 10 2.6.33 [ OK ] 11 2.6.34 [ OK ] 12 2.6.35 [ OK ] 13 2.6.36 [ OK ] 14 2.6.37 [ OK ] 15 2.6.38 [ OK ] 16 2.6.39 [ OK ] 17 3.0.65 [ OK ] 18 3.1.10 [ OK ] 19 3.2.38 [ OK ] 20 3.3.8 [ OK ] 21 3.4.32 [ OK ] 22 3.5.7 [ OK ] 23 3.6.11 [ OK ] 24 3.7.9 [ OK ] 25 3.8.0 [ OK ] 26 3.9-rc1 [ OK ] real 0m32.956s user 12m14.398s sys 2m12.304s Reported-by: CamaleĆ³n <noelamac@gmail.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r--include/linux/cordic.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/cordic.h b/include/linux/cordic.h
index 2de0aa32..7f27b007 100644
--- a/include/linux/cordic.h
+++ b/include/linux/cordic.h
@@ -1,3 +1,12 @@
+#ifndef _BACKPORT_LINUX_CORDIC_H
+#define _BACKPORT_LINUX_CORDIC_H 1
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0))
+#include_next <linux/cordic.h>
+#else
+
/*
* Copyright (c) 2011 Broadcom Corporation
*
@@ -47,3 +56,5 @@ struct cordic_iq {
struct cordic_iq cordic_calc_iq(s32 theta);
#endif /* __CORDIC_H_ */
+#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(3,1,0)) */
+#endif /* _BACKPORT_LINUX_CORDIC_H */