[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linaro-kernel
Subject:    [PATCH V6 09/10] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()
From:       Viresh Kumar <viresh.kumar () linaro ! org>
Date:       2016-11-30 5:26:12
Message-ID: 65c5e211e27c3d6862e78097ecb16a146376bc9b.1480481312.git.viresh.kumar () linaro ! org
[Download RAW message or body]

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
cases.

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(-)

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;
 	}
-- 
2.7.1.410.g6faf27b

_______________________________________________
linaro-kernel mailing list
linaro-kernel@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-kernel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic