Skip to content

Commit 88fad6c

Browse files
committed
ACPI: PM: Let acpi_dev_pm_attach() skip devices without ACPI PM
It is pointless to attach the generic ACPI PM domain to devices whose ACPI companions don't support ACPI power management and don't have a wakeup GPE, so update acpi_dev_pm_attach() to skip such devices. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/5050298.GXAFRqVoOG@rafael.j.wysocki
1 parent b8c8a8e commit 88fad6c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

drivers/acpi/device_pm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,15 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
14571457
if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
14581458
return 0;
14591459

1460+
/*
1461+
* Skip devices whose ACPI companions don't support power management and
1462+
* don't have a wakeup GPE.
1463+
*/
1464+
if (!acpi_device_power_manageable(adev) && !acpi_device_can_wakeup(adev)) {
1465+
dev_dbg(dev, "No ACPI power management or wakeup GPE\n");
1466+
return 0;
1467+
}
1468+
14601469
/*
14611470
* Only attach the power domain to the first device if the
14621471
* companion is shared by multiple. This is to prevent doing power

0 commit comments

Comments
 (0)