diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-05-09 12:17:52 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-05-14 22:58:44 +0200 |
commit | 919b7308fcc452cd4e282bab389c33384a9f3790 (patch) | |
tree | aff8f55a43ae45af67ba91efde1a1f70ef798a02 /include/linux/acpi.h | |
parent | 4f688748c958deb947759773be6dffe6b44d084d (diff) | |
download | linux-stable-919b7308fcc452cd4e282bab389c33384a9f3790.tar.gz linux-stable-919b7308fcc452cd4e282bab389c33384a9f3790.tar.bz2 linux-stable-919b7308fcc452cd4e282bab389c33384a9f3790.zip |
PM / Domains: Allow a better error handling of dev_pm_domain_attach()
The callers of dev_pm_domain_attach() currently checks the returned error
code for -EPROBE_DEFER and needs to ignore other error codes. This is an
unnecessary limitation, which also leads to a rather strange behaviour in
the error path.
Address this limitation, by changing the return codes from
acpi_dev_pm_attach() and genpd_dev_pm_attach(). More precisely, let them
return 0, when no PM domain is needed for the device and then return 1, in
case the device was successfully attached to its PM domain. In this way,
dev_pm_domain_attach(), gets a better understanding of what happens in the
attach attempts and also allowing its caller to better act on real errors
codes.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 15bfb15c2fa5..c01675b3d93f 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -899,7 +899,7 @@ static inline int acpi_subsys_runtime_suspend(struct device *dev) { return 0; } static inline int acpi_subsys_runtime_resume(struct device *dev) { return 0; } static inline int acpi_dev_pm_attach(struct device *dev, bool power_on) { - return -ENODEV; + return 0; } #endif |