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 /include | |
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 'include')
-rw-r--r-- | include/linux/pm.h | 9 | ||||
-rw-r--r-- | include/linux/suspend.h | 6 |
2 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index 9279175a4557..1f79c98f1e56 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -565,15 +565,6 @@ enum dpm_order { | |||
565 | DPM_ORDER_DEV_LAST, | 565 | DPM_ORDER_DEV_LAST, |
566 | }; | 566 | }; |
567 | 567 | ||
568 | /* | ||
569 | * Global Power Management flags | ||
570 | * Used to keep APM and ACPI from both being active | ||
571 | */ | ||
572 | extern unsigned int pm_flags; | ||
573 | |||
574 | #define PM_APM 1 | ||
575 | #define PM_ACPI 2 | ||
576 | |||
577 | extern int pm_generic_suspend(struct device *dev); | 568 | extern int pm_generic_suspend(struct device *dev); |
578 | extern int pm_generic_resume(struct device *dev); | 569 | extern int pm_generic_resume(struct device *dev); |
579 | extern int pm_generic_freeze(struct device *dev); | 570 | extern int pm_generic_freeze(struct device *dev); |
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 5e364db8a56a..5a89e3612875 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -272,9 +272,6 @@ extern int unregister_pm_notifier(struct notifier_block *nb); | |||
272 | register_pm_notifier(&fn##_nb); \ | 272 | register_pm_notifier(&fn##_nb); \ |
273 | } | 273 | } |
274 | 274 | ||
275 | extern bool pm_apm_enabled(void); | ||
276 | extern void pm_set_acpi_flag(void); | ||
277 | |||
278 | /* drivers/base/power/wakeup.c */ | 275 | /* drivers/base/power/wakeup.c */ |
279 | extern bool events_check_enabled; | 276 | extern bool events_check_enabled; |
280 | 277 | ||
@@ -295,9 +292,6 @@ static inline int unregister_pm_notifier(struct notifier_block *nb) | |||
295 | 292 | ||
296 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) | 293 | #define pm_notifier(fn, pri) do { (void)(fn); } while (0) |
297 | 294 | ||
298 | static inline bool pm_apm_enabled(void) { return false; } | ||
299 | static inline void pm_set_acpi_flag(void) {} | ||
300 | |||
301 | static inline bool pm_wakeup_pending(void) { return false; } | 295 | static inline bool pm_wakeup_pending(void) { return false; } |
302 | #endif /* !CONFIG_PM_SLEEP */ | 296 | #endif /* !CONFIG_PM_SLEEP */ |
303 | 297 | ||