powerpc: Use of for_each_node_by_name() instead of open-coding it
Instead of manually coding the loop with of_find_node_by_name(), let's switch to the standard macro for iterating over nodes with given name. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> [mpe: Fix build failures due to typo in mpc832x_mds.c] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
df26200299
commit
0aa8ff9b76
@@ -2641,7 +2641,7 @@ static void __init probe_one_macio(const char *name, const char *compat, int typ
|
||||
phys_addr_t addr;
|
||||
u64 size;
|
||||
|
||||
for (node = NULL; (node = of_find_node_by_name(node, name)) != NULL;) {
|
||||
for_each_node_by_name(node, name) {
|
||||
if (!compat)
|
||||
break;
|
||||
if (of_device_is_compatible(node, compat))
|
||||
|
Reference in New Issue
Block a user