From patchwork Tue Dec 4 05:20:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [-next] powerpc/82xx: use for_each_compatible_node() macro Date: Mon, 03 Dec 2012 19:20:31 -0000 From: Wei Yongjun X-Patchwork-Id: 203560 Message-Id: To: benh@kernel.crashing.org, paulus@samba.org Cc: yongjun_wei@trendmicro.com.cn, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun --- arch/powerpc/platforms/82xx/pq2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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