diff options
Diffstat (limited to 'include/acpi/platform/aclinux.h')
-rw-r--r-- | include/acpi/platform/aclinux.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index cd1f052d55bb..1ba7c190c2cc 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h @@ -44,6 +44,16 @@ #ifndef __ACLINUX_H__ #define __ACLINUX_H__ +#ifdef __KERNEL__ + +/* ACPICA external files should not include ACPICA headers directly. */ + +#if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H) +#error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead." +#endif + +#endif + /* Common (in-kernel/user-space) ACPICA configuration */ #define ACPI_USE_SYSTEM_CLIBRARY @@ -70,7 +80,9 @@ #ifdef EXPORT_ACPI_INTERFACES #include <linux/export.h> #endif +#ifdef CONFIG_ACPI #include <asm/acenv.h> +#endif #ifndef CONFIG_ACPI |