summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2026-03-02 19:29:07 +0300
committerRob Herring (Arm) <robh@kernel.org>2026-03-14 01:00:04 +0300
commit1838e0924e508eb30e140ad8f037863ee53be3c6 (patch)
tree00cf22c246a6fda6c406dbcd964809e0a0d24eef
parent57814f2e0cd7960fc8bbe097c05fdf2c3f8c67e4 (diff)
downloadlinux-1838e0924e508eb30e140ad8f037863ee53be3c6.tar.xz
cpufreq: airoha: Convert to of_machine_get_match()
Use the of_machine_get_match() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://patch.msgid.link/cc76137755d93af982bf255095adafc7d523692c.1772468323.git.geert+renesas@glider.be Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
-rw-r--r--drivers/cpufreq/airoha-cpufreq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/cpufreq/airoha-cpufreq.c b/drivers/cpufreq/airoha-cpufreq.c
index b6b1cdc4d11d..3e7770860d13 100644
--- a/drivers/cpufreq/airoha-cpufreq.c
+++ b/drivers/cpufreq/airoha-cpufreq.c
@@ -115,15 +115,10 @@ MODULE_DEVICE_TABLE(of, airoha_cpufreq_match_list);
static int __init airoha_cpufreq_init(void)
{
- struct device_node *np = of_find_node_by_path("/");
const struct of_device_id *match;
int ret;
- if (!np)
- return -ENODEV;
-
- match = of_match_node(airoha_cpufreq_match_list, np);
- of_node_put(np);
+ match = of_machine_get_match(airoha_cpufreq_match_list);
if (!match)
return -ENODEV;