Patchwork [2/4] Use for_each_node_with_property() in of_irq_map_init()

login
register
mail settings
Submitter Michael Ellerman
Date Nov. 13, 2008, 4:20 a.m.
Message ID <4ccd209b3cc7e9a3b05686843509ea3fa6843a37.1226550015.git.michael@ellerman.id.au>
Download mbox | patch
Permalink /patch/8528/
State Accepted
Commit 54018178ef05e32f140158cb7d7770b66042d131
Delegated to: Paul Mackerras
Headers show

Comments

Michael Ellerman - Nov. 13, 2008, 4:20 a.m.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/kernel/prom_parse.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Patch

diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c
index bc1fb27..2a1c02c 100644
--- a/arch/powerpc/kernel/prom_parse.c
+++ b/arch/powerpc/kernel/prom_parse.c
@@ -731,10 +731,7 @@  void of_irq_map_init(unsigned int flags)
 	if (flags & OF_IMAP_NO_PHANDLE) {
 		struct device_node *np;
 
-		for(np = NULL; (np = of_find_all_nodes(np)) != NULL;) {
-			if (of_get_property(np, "interrupt-controller", NULL)
-			    == NULL)
-				continue;
+		for_each_node_with_property(np, "interrupt-controller") {
 			/* Skip /chosen/interrupt-controller */
 			if (strcmp(np->name, "chosen") == 0)
 				continue;