aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/interrupt.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-31 17:54:37 -0800
committerMichael Ellerman <mpe@ellerman.id.au>2017-12-04 13:10:59 +1100
commit0aa8ff9b76282300d16e0a1403b115996ff88a4c (patch)
treef3d5d120a2f4097f1d9857f71bb6b6a1e081eb2f /arch/powerpc/platforms/cell/interrupt.c
parentdf26200299eb05fa7d059cd235847efc4c4baf80 (diff)
downloadlinux-0aa8ff9b76282300d16e0a1403b115996ff88a4c.tar.gz
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/cell/interrupt.c')
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 6fc85e29dc082..5d4bf9aed51ae 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -315,8 +315,7 @@ static int __init setup_iic(void)
struct cbe_iic_regs __iomem *node_iic;
const u32 *np;
- for (dn = NULL;
- (dn = of_find_node_by_name(dn,"interrupt-controller")) != NULL;) {
+ for_each_node_by_name(dn, "interrupt-controller") {
if (!of_device_is_compatible(dn,
"IBM,CBEA-Internal-Interrupt-Controller"))
continue;