From: Viresh Kumar Date: Fri, 21 Jul 2023 09:05:08 +0000 (+0530) Subject: OPP: Update _read_freq() to return the correct frequency X-Git-Tag: v6.6-rc1~179^2^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=034d6aac2160b732d58d82e34aaf2c058a8f72fa;p=thirdparty%2Flinux.git 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 Acked-by: Manivannan Sadhasivam --- diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 2af958dc17ba6..b83f651680e77 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)