aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2024-01-24 16:12:40 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2024-02-01 13:23:54 +0100
commit9ebc97ce939f8893ae850ebc8f1bfee5c10c31ce (patch)
tree667dc91a158c1d6de921064777ef03e15ea20879
parentca32b0757dbf628b9314c11f6a8eb00a16ee01ad (diff)
cpufreq: scmi: Convert into using of_genpd_index_by_name()multi_pm_domains_v3_of_genpd_name_helper
To simplify the code, let's convert into using of_genpd_index_by_name(). Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/cpufreq/scmi-cpufreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 4ee23f4ebf4a..647d57dc2a66 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -15,6 +15,7 @@
#include <linux/energy_model.h>
#include <linux/export.h>
#include <linux/module.h>
+#include <linux/pm_domain.h>
#include <linux/pm_opp.h>
#include <linux/slab.h>
#include <linux/scmi_protocol.h>
@@ -79,8 +80,7 @@ static int scmi_cpu_domain_id(struct device *cpu_dev)
if (of_parse_phandle_with_args(np, "clocks", "#clock-cells", 0,
&domain_id)) {
/* Find the corresponding index for power-domain "perf". */
- index = of_property_match_string(np, "power-domain-names",
- "perf");
+ index = of_genpd_index_by_name(np, "perf");
if (index < 0)
return -EINVAL;