aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/platform
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-04-29 22:05:15 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-06 18:55:01 -0400
commit42873a84a22f6ee089b720c817bb61aebeff6e0d (patch)
tree00ac8126620c279df6006fa489bd65dd8f99d7b4 /include/acpi/platform
parent8b9c1152a018883f6f0b841e12e17671f2c64c32 (diff)
ACPICA: Linux header: Add support for stubbed externals.
Linux wants to include all header files but leave empty inline stub variables for a feature that is not configured during build. This patch configures ACPICA external globals/macros/functions out and defines them into no-op when CONFIG_ACPI is not enabled. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi/platform')
-rw-r--r--include/acpi/platform/aclinux.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index f2429094b9b9..4c2f9e78001c 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -73,6 +73,37 @@
73#endif 73#endif
74#include <asm/acpi.h> 74#include <asm/acpi.h>
75 75
76#ifndef CONFIG_ACPI
77
78/* External globals for __KERNEL__, stubs is needed */
79
80#define ACPI_GLOBAL(t,a)
81#define ACPI_INIT_GLOBAL(t,a,b)
82
83/* Generating stubs for configurable ACPICA macros */
84
85#define ACPI_NO_MEM_ALLOCATIONS
86
87/* Generating stubs for configurable ACPICA functions */
88
89#define ACPI_NO_ERROR_MESSAGES
90#undef ACPI_DEBUG_OUTPUT
91
92/* External interface for __KERNEL__, stub is needed */
93
94#define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
95 static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
96#define ACPI_EXTERNAL_RETURN_OK(prototype) \
97 static ACPI_INLINE prototype {return(AE_OK);}
98#define ACPI_EXTERNAL_RETURN_VOID(prototype) \
99 static ACPI_INLINE prototype {return;}
100#define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
101 static ACPI_INLINE prototype {return(0);}
102#define ACPI_EXTERNAL_RETURN_PTR(prototype) \
103 static ACPI_INLINE prototype {return(NULL);}
104
105#endif /* CONFIG_ACPI */
106
76/* Host-dependent types and defines for in-kernel ACPICA */ 107/* Host-dependent types and defines for in-kernel ACPICA */
77 108
78#define ACPI_MACHINE_WIDTH BITS_PER_LONG 109#define ACPI_MACHINE_WIDTH BITS_PER_LONG