diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-12-01 16:28:22 +0530 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-06 02:28:00 +0100 |
commit | e231f8d7ed9a01280d18cd897ae0bbb4118bc954 (patch) | |
tree | e78f2a46fce1083580e46a3fb1c52fb28015d714 | |
parent | 4dab160eb1586f67e8ba7c55ffdd2373f7a5553e (diff) | |
download | op-kernel-dev-e231f8d7ed9a01280d18cd897ae0bbb4118bc954.zip op-kernel-dev-e231f8d7ed9a01280d18cd897ae0bbb4118bc954.tar.gz |
PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()
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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/base/power/opp/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index eceebef..35ff062 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) { ret = -EBUSY; goto err; } |