Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Geert Uytterhoeven and committed by
Rob Herring (Arm)
1838e092 57814f2e

+1 -6
+1 -6
drivers/cpufreq/airoha-cpufreq.c
··· 115 115 116 116 static int __init airoha_cpufreq_init(void) 117 117 { 118 - struct device_node *np = of_find_node_by_path("/"); 119 118 const struct of_device_id *match; 120 119 int ret; 121 120 122 - if (!np) 123 - return -ENODEV; 124 - 125 - match = of_match_node(airoha_cpufreq_match_list, np); 126 - of_node_put(np); 121 + match = of_machine_get_match(airoha_cpufreq_match_list); 127 122 if (!match) 128 123 return -ENODEV; 129 124