powerpc/82xx: Use for_each_compatible_node() macro
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 3 Dec 2012 19:20:31 +0000 (19:20 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 10 Jan 2013 06:00:51 +0000 (17:00 +1100)
Use for_each_compatible_node() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/82xx/pq2.c

index fb94d10..fc8b2d6 100644 (file)
@@ -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