summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2023-07-21 11:05:08 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2023-07-24 09:57:03 +0200
commit034d6aac2160b732d58d82e34aaf2c058a8f72fa (patch)
tree08d4d852e0ad0b6c2e0b27a5b29a0d3b961d556e
parentOPP: Add dev_pm_opp_find_freq_exact_indexed() (diff)
downloadlinux-034d6aac2160b732d58d82e34aaf2c058a8f72fa.tar.xz
linux-034d6aac2160b732d58d82e34aaf2c058a8f72fa.zip
OPP: Update _read_freq() to return the correct frequency
Now that we support finding indexed frequencies, lets update _read_freq() to return the right one. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-rw-r--r--drivers/opp/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index 2af958dc17ba..b83f651680e7 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -470,7 +470,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_opp_count);
/* Helpers to read keys */
static unsigned long _read_freq(struct dev_pm_opp *opp, int index)
{
- return opp->rates[0];
+ return opp->rates[index];
}
static unsigned long _read_level(struct dev_pm_opp *opp, int index)