]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ACPI / PM: Assign the ->detach() callback when attaching the PM domain
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 19 Sep 2014 18:27:35 +0000 (20:27 +0200)
committerRobin Gong <b38343@freescale.com>
Wed, 11 Feb 2015 05:07:32 +0000 (13:07 +0800)
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 <ulf.hansson@linaro.org>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 86f1e15f5646b4855bd77025c950239650c4843e)
(cherry picked from commit 5856005b1a1f4aecef050de96a02e1c757049fa0)

drivers/acpi/device_pm.c

index c14a00d3dca61e5d943c41d5fe11fb90669550a6..fc75bdf8067e89e521a596f875b403b55cb7c1c0 100644 (file)
@@ -987,6 +987,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);