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: 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>

authored by

Geert Uytterhoeven and committed by
Rob Herring (Arm)
951318c4 8cd94ead

+1 -11
+1 -11
drivers/cpufreq/ti-cpufreq.c
··· 502 502 {}, 503 503 }; 504 504 505 - static const struct of_device_id *ti_cpufreq_match_node(void) 506 - { 507 - struct device_node *np __free(device_node) = of_find_node_by_path("/"); 508 - const struct of_device_id *match; 509 - 510 - match = of_match_node(ti_cpufreq_of_match, np); 511 - 512 - return match; 513 - } 514 - 515 505 static int ti_cpufreq_probe(struct platform_device *pdev) 516 506 { 517 507 u32 version[VERSION_COUNT]; ··· 586 596 const struct of_device_id *match; 587 597 588 598 /* Check to ensure we are on a compatible platform */ 589 - match = ti_cpufreq_match_node(); 599 + match = of_machine_get_match(ti_cpufreq_of_match); 590 600 if (match) 591 601 platform_device_register_data(NULL, "ti-cpufreq", -1, match, 592 602 sizeof(*match));