[PATCH 2/3] acpi: Only include asm header when available
Harm Berntsen
harm.berntsen at nedap.com
Fri Oct 30 09:45:17 CET 2020
The only platforms with an asm/acpi_table.h file are X86 and Sandbox.
Some drivers, i.e. pci_mmc.c, can generate ACPI info and therefore
include asm/acpi_table.h by proxy. This commit ensures that the
platforms wishing to use such driver and do not have ACPI support do not
fail on this include. The if defined structure is also used in other
places to conditionally include asm headers, i.e.
arch/arm/include/asm/gpio.h
Signed-off-by: Harm Berntsen <harm.berntsen at nedap.com>
CC: Simon Glass <sjg at chromium.org>
---
include/acpi/acpi_table.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index abbca6530d..8d9d0f8d19 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -690,6 +690,8 @@ void acpi_setup_base_tables(struct acpi_ctx *ctx, void *start);
#endif /* !__ACPI__*/
+#if defined(CONFIG_X86) || defined(CONFIG_SANDBOX)
#include <asm/acpi_table.h>
+#endif
#endif /* __ACPI_TABLE_H__ */
More information about the U-Boot
mailing list