ACPICA: Linux: Add support to exclude <asm/acenv.h> inclusion.
authorLv Zheng <lv.zheng@intel.com>
Wed, 16 Jul 2014 08:58:08 +0000 (16:58 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Jul 2014 23:10:44 +0000 (01:10 +0200)
The forthcoming patch will make <acpi/acpi.h> to be visible to all kernel
source code. Thus for the architectures that do not support ACPI and
haven't implemented <asm/acenv.h>, we need to make it excluded.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/ia64/include/asm/acenv.h
arch/x86/include/asm/acenv.h
include/acpi/platform/aclinux.h

index 3f9eaeec98734852e98830969ccf826d399dabde..35ff13afbf345df260ecc30045f91ca1a77fce42 100644 (file)
@@ -19,8 +19,6 @@
 
 /* Asm macros */
 
-#ifdef CONFIG_ACPI
-
 static inline int
 ia64_acpi_acquire_global_lock(unsigned int *lock)
 {
@@ -51,6 +49,4 @@ ia64_acpi_release_global_lock(unsigned int *lock)
 #define ACPI_RELEASE_GLOBAL_LOCK(facs, Acq)                            \
        ((Acq) = ia64_acpi_release_global_lock(&facs->global_lock))
 
-#endif
-
 #endif /* _ASM_IA64_ACENV_H */
index 66873297e9f5764d89cf1e57544c65b7f2d86570..1b010a859b8b4816c7b28decea1f853eb0b2b5b3 100644 (file)
@@ -18,8 +18,6 @@
 
 #define ACPI_FLUSH_CPU_CACHE() wbinvd()
 
-#ifdef CONFIG_ACPI
-
 int __acpi_acquire_global_lock(unsigned int *lock);
 int __acpi_release_global_lock(unsigned int *lock);
 
@@ -44,6 +42,4 @@ int __acpi_release_global_lock(unsigned int *lock);
            : "=r"(n_hi), "=r"(n_lo)    \
            : "0"(n_hi), "1"(n_lo))
 
-#endif
-
 #endif /* _ASM_X86_ACENV_H */
index cd1f052d55bb439175c5eb9624c38891b6cf3a0a..dfba35476b8ad726fd3e0f4d92a93a7a16eca674 100644 (file)
@@ -70,7 +70,9 @@
 #ifdef EXPORT_ACPI_INTERFACES
 #include <linux/export.h>
 #endif
+#ifdef CONFIG_ACPI
 #include <asm/acenv.h>
+#endif
 
 #ifndef CONFIG_ACPI