diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-02-15 15:22:24 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-03-14 19:43:16 -0400 |
commit | 6831c6edc7b272a08dd2a6c71bb183a48fe98ae6 (patch) | |
tree | fc3ef253f12bd9f2d211271c09a5475ed19b18b0 /kernel/power/main.c | |
parent | e8665002477f0278f84f898145b1f141ba26ee26 (diff) |
PM: Drop pm_flags that is not necessary
The variable pm_flags is used to prevent APM from being enabled
along with ACPI, which would lead to problems. However, acpi_init()
is always called before apm_init() and after acpi_init() has
returned, it is known whether or not ACPI will be used. Namely, if
acpi_disabled is not set after acpi_init() has returned, this means
that ACPI is enabled. Thus, it is sufficient to check acpi_disabled
in apm_init() to prevent APM from being enabled in parallel with
ACPI.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r-- | kernel/power/main.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index b5405af48ddb..8eaba5f27b10 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -19,19 +19,6 @@ DEFINE_MUTEX(pm_mutex); | |||
19 | 19 | ||
20 | #ifdef CONFIG_PM_SLEEP | 20 | #ifdef CONFIG_PM_SLEEP |
21 | 21 | ||
22 | unsigned int pm_flags; | ||
23 | EXPORT_SYMBOL(pm_flags); | ||
24 | |||
25 | bool pm_apm_enabled(void) | ||
26 | { | ||
27 | return !!(pm_flags & PM_APM); | ||
28 | } | ||
29 | |||
30 | void pm_set_acpi_flag(void) | ||
31 | { | ||
32 | pm_flags |= PM_ACPI; | ||
33 | } | ||
34 | |||
35 | /* Routines for PM-transition notifications */ | 22 | /* Routines for PM-transition notifications */ |
36 | 23 | ||
37 | static BLOCKING_NOTIFIER_HEAD(pm_chain_head); | 24 | static BLOCKING_NOTIFIER_HEAD(pm_chain_head); |