]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 1 Dec 2016 10:58:22 +0000 (16:28 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 6 Dec 2016 01:28:00 +0000 (02:28 +0100)
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>
drivers/base/power/opp/core.c

index eceebef36f211c3132cd7e6bf37510525baed49d..35ff06283738036e8388ea19a502b9434874ab99 100644 (file)
@@ -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;
        }