diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-02-01 04:54:37 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-12-04 05:10:59 +0300 |
commit | 0aa8ff9b76282300d16e0a1403b115996ff88a4c (patch) | |
tree | f3d5d120a2f4097f1d9857f71bb6b6a1e081eb2f /arch/powerpc/platforms/powermac | |
parent | df26200299eb05fa7d059cd235847efc4c4baf80 (diff) | |
download | linux-0aa8ff9b76282300d16e0a1403b115996ff88a4c.tar.xz |
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>
Diffstat (limited to 'arch/powerpc/platforms/powermac')
-rw-r--r-- | arch/powerpc/platforms/powermac/feature.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index 80a31f581d36..466b84234683 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -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)) |