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>
This commit is contained in:
@@ -19,19 +19,6 @@ DEFINE_MUTEX(pm_mutex);
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
unsigned int pm_flags;
|
||||
EXPORT_SYMBOL(pm_flags);
|
||||
|
||||
bool pm_apm_enabled(void)
|
||||
{
|
||||
return !!(pm_flags & PM_APM);
|
||||
}
|
||||
|
||||
void pm_set_acpi_flag(void)
|
||||
{
|
||||
pm_flags |= PM_ACPI;
|
||||
}
|
||||
|
||||
/* Routines for PM-transition notifications */
|
||||
|
||||
static BLOCKING_NOTIFIER_HEAD(pm_chain_head);
|
||||
|
Reference in New Issue
Block a user