diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2026-03-02 17:29:08 +0100 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2026-03-13 17:00:04 -0500 |
| commit | 8cd94ead5184c5bdde74dc0afc316c6f3c41fdd7 (patch) | |
| tree | d40f887796b30058696538c36bcaa88e0a5e6e83 /drivers/cpufreq | |
| parent | 1838e0924e508eb30e140ad8f037863ee53be3c6 (diff) | |
| download | linux-next-8cd94ead5184c5bdde74dc0afc316c6f3c41fdd7.tar.gz linux-next-8cd94ead5184c5bdde74dc0afc316c6f3c41fdd7.zip | |
cpufreq: qcom-nvmem: 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/886a603a7a1de6c8cb14ee0783ee0bceea4d914a.1772468323.git.geert+renesas@glider.be
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/cpufreq')
| -rw-r--r-- | drivers/cpufreq/qcom-cpufreq-nvmem.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c index b8081acba928..e6d28d162442 100644 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c @@ -291,17 +291,9 @@ static int qcom_cpufreq_ipq8064_name_version(struct device *cpu_dev, ret = qcom_smem_get_soc_id(&msm_id); if (ret == -ENODEV) { const struct of_device_id *match; - struct device_node *root; - - root = of_find_node_by_path("/"); - if (!root) { - ret = -ENODEV; - goto exit; - } /* Fallback to compatible match with no SMEM initialized */ - match = of_match_node(qcom_cpufreq_ipq806x_match_list, root); - of_node_put(root); + match = of_machine_get_match(qcom_cpufreq_ipq806x_match_list); if (!match) { ret = -ENODEV; goto exit; @@ -647,14 +639,10 @@ MODULE_DEVICE_TABLE(of, qcom_cpufreq_match_list); */ static int __init qcom_cpufreq_init(void) { - struct device_node *np __free(device_node) = of_find_node_by_path("/"); const struct of_device_id *match; int ret; - if (!np) - return -ENODEV; - - match = of_match_node(qcom_cpufreq_match_list, np); + match = of_machine_get_match(qcom_cpufreq_match_list); if (!match) return -ENODEV; |
