diff options
| author | Geert Uytterhoeven <geert+renesas@glider.be> | 2026-03-02 19:29:09 +0300 |
|---|---|---|
| committer | Rob Herring (Arm) <robh@kernel.org> | 2026-03-14 01:00:04 +0300 |
| commit | 951318c4651a646f4835ae33abe7c4cb232e7c6e (patch) | |
| tree | 7c2c43b85292cd999980a958b15a0c2a90afdc4a | |
| parent | 8cd94ead5184c5bdde74dc0afc316c6f3c41fdd7 (diff) | |
| download | linux-951318c4651a646f4835ae33abe7c4cb232e7c6e.tar.xz | |
cpufreq: ti-cpufreq: 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/bba0631aea78b6db7d453a9f9e98ea16b7e2c269.1772468323.git.geert+renesas@glider.be
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
| -rw-r--r-- | drivers/cpufreq/ti-cpufreq.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c index 3d1129aeed02..a01abc1622eb 100644 --- a/drivers/cpufreq/ti-cpufreq.c +++ b/drivers/cpufreq/ti-cpufreq.c @@ -502,16 +502,6 @@ static const struct of_device_id ti_cpufreq_of_match[] __maybe_unused = { {}, }; -static const struct of_device_id *ti_cpufreq_match_node(void) -{ - struct device_node *np __free(device_node) = of_find_node_by_path("/"); - const struct of_device_id *match; - - match = of_match_node(ti_cpufreq_of_match, np); - - return match; -} - static int ti_cpufreq_probe(struct platform_device *pdev) { u32 version[VERSION_COUNT]; @@ -596,7 +586,7 @@ static int __init ti_cpufreq_init(void) const struct of_device_id *match; /* Check to ensure we are on a compatible platform */ - match = ti_cpufreq_match_node(); + match = of_machine_get_match(ti_cpufreq_of_match); if (match) platform_device_register_data(NULL, "ti-cpufreq", -1, match, sizeof(*match)); |
