Message ID | 1344522694-31164-1-git-send-email-m.szyprowski@samsung.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Thursday, August 09, 2012, Marek Szyprowski wrote: > dev_pm_get_subsys_data() returns 1 when a new object has been created, > what should not be considered as an error for pm_genpd_add_device(). > > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> This has been reported twice already and there's a patch in linux-next to fix this issue. And your patch is incomplete. :-) Thanks, Rafael > --- > drivers/base/power/domain.c | 9 ++++++++- > 1 files changed, 8 insertions(+), 1 deletions(-) > > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c > index ba3487c..6b61819 100644 > --- a/drivers/base/power/domain.c > +++ b/drivers/base/power/domain.c > @@ -1323,9 +1323,16 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, > } > > ret = dev_pm_get_subsys_data(dev); > - if (ret) > + > + if (ret < 0) > goto out; > > + /* > + * dev_pm_get_subsys_data() returns 1 when new object has been created > + */ > + if (ret == 1) > + ret = 0; > + > genpd->device_count++; > genpd->max_off_time_changed = true; > > -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index ba3487c..6b61819 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1323,9 +1323,16 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, } ret = dev_pm_get_subsys_data(dev); - if (ret) + + if (ret < 0) goto out; + /* + * dev_pm_get_subsys_data() returns 1 when new object has been created + */ + if (ret == 1) + ret = 0; + genpd->device_count++; genpd->max_off_time_changed = true;
dev_pm_get_subsys_data() returns 1 when a new object has been created, what should not be considered as an error for pm_genpd_add_device(). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> --- drivers/base/power/domain.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)