[V6,09/10] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()

Message ID 65c5e211e27c3d6862e78097ecb16a146376bc9b.1480481312.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Nov. 30, 2016, 5:14 a.m.
If a platform specific OPP driver has called this routine first and set
the regulators, then the second call from cpufreq-dt driver will hit the
WARN_ON(). Remove the WARN_ON(), but continue to return error in such

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>

Tested-by: Dave Gerlach <d-gerlach@ti.com>

 drivers/base/power/opp/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


To unsubscribe from this list: send the line "unsubscribe devicetree" 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/opp/core.c b/drivers/base/power/opp/core.c
index 1fb188b424c7..f60d7f943b64 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1485,7 +1485,7 @@  struct opp_table *dev_pm_opp_set_regulators(struct device *dev,
 	/* Already have regulators set */
-	if (WARN_ON(opp_table->regulators)) {
+	if (opp_table->regulators) {
 		opp_table = ERR_PTR(-EBUSY);
 		goto err;