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.

of: 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/83ed49314b94dab7781e1d74236af72dd5c349c6.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)
57814f2e 82b6c1b5

+1 -8
+1 -8
drivers/of/base.c
··· 464 464 const void *of_machine_get_match_data(const struct of_device_id *matches) 465 465 { 466 466 const struct of_device_id *match; 467 - struct device_node *root; 468 467 469 - root = of_find_node_by_path("/"); 470 - if (!root) 471 - return NULL; 472 - 473 - match = of_match_node(matches, root); 474 - of_node_put(root); 475 - 468 + match = of_machine_get_match(matches); 476 469 if (!match) 477 470 return NULL; 478 471