diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2022-06-10 07:02:50 +0200 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2022-07-08 07:57:51 +0200 |
commit | 8bdac14b0cd56d9578d3112375ed8b23884c1a69 (patch) | |
tree | 83bbc602c3b1f0f47333a5c6becc60852467ac54 /drivers/opp/core.c | |
parent | OPP: Remove rate_not_available parameter to _opp_add() (diff) | |
download | linux-8bdac14b0cd56d9578d3112375ed8b23884c1a69.tar.xz linux-8bdac14b0cd56d9578d3112375ed8b23884c1a69.zip |
OPP: Reuse _opp_compare_key() in _opp_add_static_v2()
Reuse _opp_compare_key() in _opp_add_static_v2() instead of just
comparing frequency while finding suspend frequency. Also add a comment
over _opp_compare_key() explaining its return values.
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/core.c')
-rw-r--r-- | drivers/opp/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c index ae5949656d77..00d5911b20f8 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1636,6 +1636,12 @@ static bool _opp_supported_by_regulators(struct dev_pm_opp *opp, return true; } +/* + * Returns + * 0: opp1 == opp2 + * 1: opp1 > opp2 + * -1: opp1 < opp2 + */ int _opp_compare_key(struct dev_pm_opp *opp1, struct dev_pm_opp *opp2) { if (opp1->rate != opp2->rate) |