提交 94ef9b8e 编写于 作者: U Ulf Hansson 提交者: Rafael J. Wysocki

PM / Domains: Don't return -EEXIST at attach when PM domain exists

As dev_pm_domain_attach() isn't the only way to assign PM domain pointers
to devices, clearly we must allow a device to have the pointer already
being assigned. For this reason, return 0 instead of -EEXIST.
Reported-by: NKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
Tested-by: NTested-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 71f277a7
......@@ -106,7 +106,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on)
int ret;
if (dev->pm_domain)
return -EEXIST;
return 0;
ret = acpi_dev_pm_attach(dev, power_on);
if (!ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册