diff options
author | Len Brown <len.brown@intel.com> | 2007-12-13 17:38:03 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-01-11 12:26:47 -0500 |
commit | 9f9adecd2d0e4f88fa0e8cb06c6ec207748df70a (patch) | |
tree | b3914860b74a9f6c3ae42016aa708b54040248f8 /drivers | |
parent | da8cadb31b82c9d41fc593c8deab6aa20b162d6b (diff) |
PM: ACPI and APM must not be enabled at the same time
ACPI and APM used "pm_active" to guarantee that
they would not be simultaneously active.
But pm_active was recently moved under CONFIG_PM_LEGACY,
so that without CONFIG_PM_LEGACY, pm_active became a NOP --
allowing ACPI and APM to both be simultaneously enabled.
This caused unpredictable results, including boot hangs.
Further, the code under CONFIG_PM_LEGACY is scheduled
for removal.
So replace pm_active with pm_flags.
pm_flags depends only on CONFIG_PM,
which is present for both CONFIG_APM and CONFIG_ACPI.
http://bugzilla.kernel.org/show_bug.cgi?id=9194
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/bus.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 49d432d0a12c..d7a115c362d1 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/list.h> | 29 | #include <linux/list.h> |
30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
31 | #include <linux/pm.h> | 31 | #include <linux/pm.h> |
32 | #include <linux/pm_legacy.h> | ||
33 | #include <linux/device.h> | 32 | #include <linux/device.h> |
34 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
35 | #ifdef CONFIG_X86 | 34 | #ifdef CONFIG_X86 |
@@ -764,16 +763,14 @@ static int __init acpi_init(void) | |||
764 | result = acpi_bus_init(); | 763 | result = acpi_bus_init(); |
765 | 764 | ||
766 | if (!result) { | 765 | if (!result) { |
767 | #ifdef CONFIG_PM_LEGACY | 766 | if (!(pm_flags & PM_APM)) |
768 | if (!PM_IS_ACTIVE()) | 767 | pm_flags |= PM_ACPI; |
769 | pm_active = 1; | ||
770 | else { | 768 | else { |
771 | printk(KERN_INFO PREFIX | 769 | printk(KERN_INFO PREFIX |
772 | "APM is already active, exiting\n"); | 770 | "APM is already active, exiting\n"); |
773 | disable_acpi(); | 771 | disable_acpi(); |
774 | result = -ENODEV; | 772 | result = -ENODEV; |
775 | } | 773 | } |
776 | #endif | ||
777 | } else | 774 | } else |
778 | disable_acpi(); | 775 | disable_acpi(); |
779 | 776 | ||