From 89c2798f1f2f690cdd269e38ef386ff720435816 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 8 Apr 2020 16:57:37 -0600 Subject: 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 Reviewed-by: Bin Meng Reviewed-by: Wolfgang Wallner --- include/acpi/acpi_table.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h index b4404a632c..dd74895813 100644 --- a/include/acpi/acpi_table.h +++ b/include/acpi/acpi_table.h @@ -21,6 +21,8 @@ #define ACPI_RSDP_REV_ACPI_1_0 0 #define ACPI_RSDP_REV_ACPI_2_0 2 +#if !defined(__ACPI__) + /* * RSDP (Root System Description Pointer) * Note: ACPI 1.0 didn't have length, xsdt_address, and ext_checksum @@ -389,6 +391,8 @@ struct __packed acpi_spcr { u32 reserved2; }; +#endif /* !__ACPI__*/ + #include #endif /* __ACPI_TABLE_H__ */ -- cgit v1.2.1