opp: Allow disabled OPPs in dev_pm_opp_get_freq()
authorAndrew-sh.Cheng <andrew-sh.cheng@mediatek.com>
Mon, 20 Jul 2020 08:55:26 +0000 (16:55 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 24 Jul 2020 02:35:54 +0000 (08:05 +0530)
Allow dev_pm_opp_get_freq() to work for disabled OPPs.

Signed-off-by: Andrew-sh.Cheng <andrew-sh.cheng@mediatek.com>
[ Viresh: Massaged commit log ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c

index 864cf4c..0c8c74a 100644 (file)
@@ -118,7 +118,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_voltage);
  */
 unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp)
 {
-       if (IS_ERR_OR_NULL(opp) || !opp->available) {
+       if (IS_ERR_OR_NULL(opp)) {
                pr_err("%s: Invalid parameters\n", __func__);
                return 0;
        }