Thread (12 messages) 12 messages, 2 authors, 2014-11-05
DORMANTno replies

[PATCH 3/4] PM / Domains: Improve error handling while adding/removing devices

From: Ulf Hansson <hidden>
Date: 2014-11-05 08:03:05
Also in: linux-pm, linux-samsung-soc

On 5 November 2014 08:47, Geert Uytterhoeven [off-list ref] wrote:
On Tue, Oct 28, 2014 at 3:38 PM, Ulf Hansson [off-list ref] wrote:
quoted
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1358,25 +1358,81 @@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);

 #endif /* CONFIG_PM_SLEEP */

-static struct generic_pm_domain_data *__pm_genpd_alloc_dev_data(struct device *dev)
+static int genpd_alloc_dev_data(struct generic_pm_domain *genpd,
+                               struct device *dev, struct gpd_timing_data *td)
 {
[...]
quoted
+       if (genpd->attach_dev)
+               genpd->attach_dev(dev);
Note that dev->pm_domain is not yet set at this point, so the callee
can no longer
know to which domain the device is being attached.
Should we re-add the parameter, or move the attach_dev() back to
__pm_genpd_add_device(), like Kevin suggested.
I agree.

I am working on a new version, which adopts to your suggestions.

Kind regards
Uffe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help