[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1344522694-31164-1-git-send-email-m.szyprowski@samsung.com>
Date: Thu, 09 Aug 2012 16:31:34 +0200
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: [PATCH] PM / Domains: fix early device initialization failure
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@...sung.com>
---
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;
--
1.7.1.569.g6f426
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists