author: Viresh Kumar <viresh.kumar@linaro.org> 2018-06-14 10:03:26 +0530
committer: Viresh Kumar <viresh.kumar@linaro.org> 2018-11-05 07:40:43 +0530
commit: ca1b5d77b1c69df7d7b92860c61daa82c8bfde34
parent: 4f018bc0e1cfdec2e25072db9fecc1f363ba79ea
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 2 deletions
diff --git a/drivers/opp/of.c b/drivers/opp/of.c
index 71aef28953c2..4e494720ac25 100644
--- a/drivers/opp/of.c
+++ b/drivers/opp/of.c
@@ -595,12 +595,13 @@ static struct dev_pm_opp *_opp_add_static_v2(struct opp_table *opp_table,
if (!of_property_read_u32(np, "clock-latency-ns", &val))
new_opp->clock_latency_ns = val;
- new_opp->pstate = of_genpd_opp_to_performance_state(dev, np);
-
ret = opp_parse_supplies(new_opp, dev, opp_table);
if (ret)
goto free_required_opps;
+ if (opp_table->is_genpd)
+ new_opp->pstate = pm_genpd_opp_to_performance_state(dev, new_opp);
+
ret = _opp_add(dev, new_opp, opp_table, rate_not_available);
if (ret) {
/* Don't return error for duplicate OPPs */