===================================================================
@@ -1025,9 +1025,7 @@ static int __init acpi_init(void)
if (!result) {
pci_mmcfg_late_init();
- if (!(pm_flags & PM_APM))
- pm_flags |= PM_ACPI;
- else {
+ if (!acpi_pm_enabled()) {
printk(KERN_INFO PREFIX
"APM is already active, exiting\n");
disable_acpi();
===================================================================
@@ -82,12 +82,18 @@ void acpi_ec_unblock_transactions_early(
extern int acpi_sleep_init(void);
#ifdef CONFIG_ACPI_SLEEP
+/* drivers/acpi/sleep.c */
+bool acpi_pm_enabled(void);
+
+/* drivers/acpi/nvs.c */
int acpi_sleep_proc_init(void);
int suspend_nvs_alloc(void);
void suspend_nvs_free(void);
int suspend_nvs_save(void);
void suspend_nvs_restore(void);
#else
+static inline bool acpi_pm_enabled(void) { return true; }
+
static inline int acpi_sleep_proc_init(void) { return 0; }
static inline int suspend_nvs_alloc(void) { return 0; }
static inline void suspend_nvs_free(void) {}
===================================================================
@@ -657,6 +657,18 @@ int acpi_pm_device_sleep_state(struct de
#ifdef CONFIG_PM_SLEEP
/**
+ *
+ */
+bool acpi_pm_enabled(void)
+{
+ if (!(pm_flags & PM_APM)) {
+ pm_flags |= PM_ACPI;
+ return true;
+ }
+ return false;
+}
+
+/**
* acpi_pm_device_sleep_wake - enable or disable the system wake-up
* capability of given device
* @dev: device to handle
===================================================================
@@ -7,7 +7,6 @@ menuconfig ACPI
depends on !IA64_HP_SIM
depends on IA64 || X86
depends on PCI
- depends on PM
select PNP
default y
help