diff mbox

[4/4] Use of_find_node_with_property() in pmac_setup_arch()

Message ID cf9d9fddba10efbfd006706d6c5e2e201ff80c67.1226550015.git.michael@ellerman.id.au (mailing list archive)
State Accepted, archived
Commit 22059a90b82d6cd02d488c48c27a4d0ad976c919
Delegated to: Paul Mackerras
Headers show

Commit Message

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

Comments

Benjamin Herrenschmidt Nov. 13, 2008, 9:27 a.m. UTC | #1
On Thu, 2008-11-13 at 15:20 +1100, Michael Ellerman wrote:
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

> ---
>  arch/powerpc/platforms/powermac/setup.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
> index 82c14d2..1293772 100644
> --- a/arch/powerpc/platforms/powermac/setup.c
> +++ b/arch/powerpc/platforms/powermac/setup.c
> @@ -310,9 +310,7 @@ static void __init pmac_setup_arch(void)
>  	}
>  
>  	/* See if newworld or oldworld */
> -	for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
> -		if (of_get_property(ic, "interrupt-controller", NULL))
> -			break;
> +	ic = of_find_node_with_property(NULL, "interrupt-controller");
>  	if (ic) {
>  		pmac_newworld = 1;
>  		of_node_put(ic);
diff mbox

Patch

diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 82c14d2..1293772 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -310,9 +310,7 @@  static void __init pmac_setup_arch(void)
 	}
 
 	/* See if newworld or oldworld */
-	for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
-		if (of_get_property(ic, "interrupt-controller", NULL))
-			break;
+	ic = of_find_node_with_property(NULL, "interrupt-controller");
 	if (ic) {
 		pmac_newworld = 1;
 		of_node_put(ic);