of: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer. Cc: Frank Rowand <frowand.list@gmail.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
@@ -281,7 +281,7 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||
adjust_overlay_phandles(overlay, phandle_delta);
|
||||
|
||||
for_each_child_of_node(overlay, local_fixups)
|
||||
if (!of_node_cmp(local_fixups->name, "__local_fixups__"))
|
||||
if (of_node_name_eq(local_fixups, "__local_fixups__"))
|
||||
break;
|
||||
|
||||
err = adjust_local_phandle_references(local_fixups, overlay, phandle_delta);
|
||||
@@ -291,7 +291,7 @@ int of_resolve_phandles(struct device_node *overlay)
|
||||
overlay_fixups = NULL;
|
||||
|
||||
for_each_child_of_node(overlay, child) {
|
||||
if (!of_node_cmp(child->name, "__fixups__"))
|
||||
if (of_node_name_eq(child, "__fixups__"))
|
||||
overlay_fixups = child;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user