From: Ulf Hansson Date: Fri, 19 Sep 2014 18:27:35 +0000 (+0200) Subject: ACPI / PM: Assign the ->detach() callback when attaching the PM domain X-Git-Tag: firefly_0821_release~3680^2~36^2~4^2~1 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0475cf9a2f972b7e12a093623ede7735e49835c1;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki (cherry picked from commit 86f1e15f5646b4855bd77025c950239650c4843e) Signed-off-by: Mark Brown --- diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 31c217a42839..dbaa7aa23e3b 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c @@ -952,6 +952,8 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on) acpi_dev_pm_full_power(adev); __acpi_device_run_wake(adev, false); } + + dev->pm_domain->detach = acpi_dev_pm_detach; return 0; } EXPORT_SYMBOL_GPL(acpi_dev_pm_attach);