Skip to content
Commit 067b7ce0 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Rafael J. Wysocki
Browse files

PM / OPP: optimize dev_pm_opp_set_rate() performance a bit



In dev_pm_opp_set_rate(), _find_opp_table() is called 4 times: once by
_get_opp_clk(), once by dev_pm_opp_set_rate() itself, and twice by
dev_pm_opp_find_freq_ceil(). If there are several opp_tables in the
system, three times of opp table finding is a big waste. This patch
reduced the call of _find_opp_table() to twice.

Signed-off-by: default avatarJisheng Zhang <jszhang@marvell.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 523d939e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment