diff options
Diffstat (limited to 'drivers/of/resolver.c')
-rw-r--r-- | drivers/of/resolver.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c index 9107c1fbb6..2457ae96a4 100644 --- a/drivers/of/resolver.c +++ b/drivers/of/resolver.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-only /* * Functions for dealing with DT resolution * @@ -160,9 +160,7 @@ static int adjust_local_phandle_references(struct device_node *local_fixups, } for_each_child_of_node(local_fixups, child) { - for_each_child_of_node(overlay, overlay_child) - if (!of_node_cmp(child->name, overlay_child->name)) - break; + overlay_child = of_get_child_by_name(overlay, child->name); if (!overlay_child) return -EINVAL; @@ -216,7 +214,7 @@ struct device_node *of_resolve_phandles(struct device_node *root, * to a phandle defined in the overlay. We must update the references, * because we just adjusted the definitions. */ - local_fixups = of_find_node_by_name(result, "__local_fixups__"); + local_fixups = of_find_node_by_name_address(result, "__local_fixups__"); err = adjust_local_phandle_references(local_fixups, result, delta); if (err) { pr_err("failed to fix phandles in overlay\n"); @@ -229,7 +227,7 @@ struct device_node *of_resolve_phandles(struct device_node *root, * the base device tree. We must update the references, because they * are otherwise undefined. */ - overlay_fixups = of_find_node_by_name(result, "__fixups__"); + overlay_fixups = of_find_node_by_name_address(result, "__fixups__"); if (!overlay_fixups) { pr_debug("overlay does not contain phandles to base devicetree\n"); goto out; |