[PATCH 1/2] ACPICA: acpidump: Add sparse declarators support.

From: Lv Zheng
Date: Mon Feb 10 2014 - 21:52:34 EST


Linux kernel build is not affected by this commit.

Linux kernel resident ACPICA headers include some sparse declarators for
kernel static checkers. This patch adds code to disable them for non
__KERNEL__ defined code so that it is possible for the ACPICA user space
tool's source files to be built with Linux kernel ACPICA header files
included. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@xxxxxxxxx>
---
include/acpi/platform/aclinux.h | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 30c9a7c..f41f59b 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -89,6 +89,16 @@
#include <ctype.h>
#include <unistd.h>

+/* Disable kernel specific declarators */
+
+#ifndef __init
+#define __init
+#endif
+
+#ifndef __iomem
+#define __iomem
+#endif
+
/* Host-dependent types and defines for user-space ACPICA */

#define ACPI_FLUSH_CPU_CACHE()
--
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/