Patchwork [-next] powerpc/82xx: use for_each_compatible_node() macro

login
register
mail settings
Submitter Wei Yongjun
Date Dec. 4, 2012, 5:20 a.m.
Message ID <CAPgLHd-4S=mcXuNzs9ULZ7KZ3cs95Z2OevoOZsWt4-G0oFa+cw@mail.gmail.com>
Download mbox | patch
Permalink /patch/203560/
State Accepted, archived
Commit e49f1e203f3a66dd2982bcd8695e6f4a4f89f876
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Wei Yongjun - Dec. 4, 2012, 5:20 a.m.
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use for_each_compatible_node() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 arch/powerpc/platforms/82xx/pq2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/arch/powerpc/platforms/82xx/pq2.c b/arch/powerpc/platforms/82xx/pq2.c
index fb94d10..fc8b2d6 100644
--- a/arch/powerpc/platforms/82xx/pq2.c
+++ b/arch/powerpc/platforms/82xx/pq2.c
@@ -71,11 +71,11 @@  err:
 
 void __init pq2_init_pci(void)
 {
-	struct device_node *np = NULL;
+	struct device_node *np;
 
 	ppc_md.pci_exclude_device = pq2_pci_exclude_device;
 
-	while ((np = of_find_compatible_node(np, NULL, "fsl,pq2-pci")))
+	for_each_compatible_node(np, NULL, "fsl,pq2-pci")
 		pq2_pci_add_bridge(np);
 }
 #endif