Skip to content

Commit

Permalink
PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Dec 6, 2016
1 parent 4dab160 commit e231f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/power/opp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e231f8d

Please sign in to comment.