summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2026-03-02 19:29:06 +0300
committerRob Herring (Arm) <robh@kernel.org>2026-03-14 01:00:04 +0300
commit57814f2e0cd7960fc8bbe097c05fdf2c3f8c67e4 (patch)
tree102945e6ab333b670804ac080158be02d4c09807
parent82b6c1b542ea0530318c6f2a880d884eb4dce49f (diff)
downloadlinux-57814f2e0cd7960fc8bbe097c05fdf2c3f8c67e4.tar.xz
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>
-rw-r--r--drivers/of/base.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 2a01d2a66eed..af048ab88e69 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -464,15 +464,8 @@ EXPORT_SYMBOL(of_machine_get_match);
const void *of_machine_get_match_data(const struct of_device_id *matches)
{
const struct of_device_id *match;
- struct device_node *root;
-
- root = of_find_node_by_path("/");
- if (!root)
- return NULL;
-
- match = of_match_node(matches, root);
- of_node_put(root);
+ match = of_machine_get_match(matches);
if (!match)
return NULL;