Skip to content

Commit 86f1e15

Browse files
storulfrafaeljw
authored andcommitted
ACPI / PM: Assign the ->detach() callback when attaching the PM domain
As as preparation to simplify the detachment of devices from their PM domains, we assign the ->detach() callback to genpd_dev_pm_detach(). Signed-off-by: Ulf Hansson <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent c3099a5 commit 86f1e15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/acpi/device_pm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,8 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
10721072
acpi_dev_pm_full_power(adev);
10731073
acpi_device_wakeup(adev, ACPI_STATE_S0, false);
10741074
}
1075+
1076+
dev->pm_domain->detach = acpi_dev_pm_detach;
10751077
return 0;
10761078
}
10771079
EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);

0 commit comments

Comments
 (0)