Skip to content

Commit 7269c25

Browse files
committed
OPP: Pass rounded rate to _set_opp()
The OPP core finds the eventual frequency to set with the help of clk_round_rate() and the same was earlier getting passed to _set_opp() and that's what would get configured. The commit 1efae8d ("OPP: Make dev_pm_opp_set_opp() independent of frequency") mistakenly changed that. Fix it. Fixes: 1efae8d ("OPP: Make dev_pm_opp_set_opp() independent of frequency") Cc: v5.18+ <stable@vger.kernel.org> # v6.0+ Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 0b40dd3 commit 7269c25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/opp/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,12 +1352,12 @@ int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
13521352
* value of the frequency. In such a case, do not abort but
13531353
* configure the hardware to the desired frequency forcefully.
13541354
*/
1355-
forced = opp_table->rate_clk_single != target_freq;
1355+
forced = opp_table->rate_clk_single != freq;
13561356
}
13571357

1358-
ret = _set_opp(dev, opp_table, opp, &target_freq, forced);
1358+
ret = _set_opp(dev, opp_table, opp, &freq, forced);
13591359

1360-
if (target_freq)
1360+
if (freq)
13611361
dev_pm_opp_put(opp);
13621362

13631363
put_opp_table:

0 commit comments

Comments
 (0)