]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h
authorFeng Tang <feng.tang@intel.com>
Tue, 28 Jul 2009 09:41:53 +0000 (17:41 +0800)
committerLen Brown <len.brown@intel.com>
Fri, 28 Aug 2009 23:57:29 +0000 (19:57 -0400)
linux/acpi.h is the top level header for interfacing
with the ACPI sub-system, so acpi_disabled should be
up there instead of down in asm/acpi.h -- particularly
since asm/acpi.h doesn't exist for all architectures.

Same story for acpi_table_parse(), which is a top-level
API to Linux/ACPI.

This is necessary for building some code that
used to always depend on CONFIG_ACPI=y, but will soon
also need to build with CONFIG_ACPI=n.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
arch/x86/include/asm/acpi.h
include/linux/acpi.h

index 20d1465a2ab046d8956eec43d5f5d4d36a3bd6bb..4518dc50090380b6676074b3f2466709ddea5a4b 100644 (file)
@@ -144,7 +144,6 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate)
 
 #else /* !CONFIG_ACPI */
 
-#define acpi_disabled 1
 #define acpi_lapic 0
 #define acpi_ioapic 0
 static inline void acpi_noirq_set(void) { }
index 34321cfffeab02010ac142f353b06c4cb7e501ad..3fce811bf9ac7561ee3a22ba573552d6fe88aa1f 100644 (file)
@@ -292,7 +292,10 @@ void __init acpi_s4_no_nvs(void);
 extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 flags);
 extern void acpi_early_init(void);
 
-#else  /* CONFIG_ACPI */
+#else  /* !CONFIG_ACPI */
+
+#define acpi_disabled 1
+
 static inline void acpi_early_init(void) { }
 
 static inline int early_acpi_boot_init(void)
@@ -331,5 +334,11 @@ static inline int acpi_check_mem_region(resource_size_t start,
        return 0;
 }
 
+struct acpi_table_header;
+static inline int acpi_table_parse(char *id,
+                               int (*handler)(struct acpi_table_header *))
+{
+       return -1;
+}
 #endif /* !CONFIG_ACPI */
 #endif /*_LINUX_ACPI_H*/