aboutsummaryrefslogtreecommitdiff
path: root/include/dm/acpi.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-08 16:57:37 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-04-16 14:36:28 +0800
commit89c2798f1f2f690cdd269e38ef386ff720435816 (patch)
tree788472aaf2503f56d42dddbe5a9e0470dce5a4c3 /include/dm/acpi.h
parent776cc2019467567b9a834f80cc5b03128efa372a (diff)
downloadu-boot-89c2798f1f2f690cdd269e38ef386ff720435816.zip
u-boot-89c2798f1f2f690cdd269e38ef386ff720435816.tar.gz
u-boot-89c2798f1f2f690cdd269e38ef386ff720435816.tar.bz2
acpi: Add an __ACPI__ preprocessor symbol
The ASL compiler cannot handle C structures and the like so needs some sort of header guard around these. We already have an __ASSEMBLY__ #define but it seems best to create a new one for ACPI since the rules may be different. Add the check to a few files that ACPI always includes. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'include/dm/acpi.h')
-rw-r--r--include/dm/acpi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index ba0813f..4925791 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -22,6 +22,8 @@
/* Length of an ACPI name string including nul terminator */
#define ACPI_NAME_MAX (ACPI_NAME_LEN + 1)
+#if !defined(__ACPI__)
+
/**
* struct acpi_ops - ACPI operations supported by driver model
*/
@@ -70,4 +72,6 @@ int acpi_get_name(const struct udevice *dev, char *out_name);
*/
int acpi_copy_name(char *out_name, const char *name);
+#endif /* __ACPI__ */
+
#endif