diff mbox

[V2,8/8] PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()

Message ID 3017eefdae58adc192ccb9c829fa32ee9b58c799.1476952750.git.viresh.kumar@linaro.org
State Superseded
Headers show

Commit Message

Viresh Kumar Oct. 20, 2016, 8:45 a.m. UTC
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>

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

-- 
2.7.1.410.g6faf27b

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

Comments

Stephen Boyd Oct. 25, 2016, 7:01 p.m. UTC | #1
On 10/20, Viresh Kumar wrote:
> 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>


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
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 mbox

Patch

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index f7c4ef194aac..51dd71d16269 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -1469,7 +1469,7 @@  int dev_pm_opp_set_regulators(struct device *dev, const char *names[],
 	}
 
 	/* Already have regulators set */
-	if (WARN_ON(opp_table->regulators)) {
+	if (opp_table->regulators) {
 		ret = -EBUSY;
 		goto err;
 	}