diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-12-03 23:17:01 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-01-10 10:00:48 +0400 |
commit | 176ebf8736ee87e3bac4b4a8cbd95a5ca18dbec7 (patch) | |
tree | 640c102d80f349660809a81880e584dc0be919e3 /arch | |
parent | 7943b310001fd7858154bc3af2a78e0dd6bfea03 (diff) | |
download | linux-176ebf8736ee87e3bac4b4a8cbd95a5ca18dbec7.tar.xz |
powerpc/celleb: Use for_each_compatible_node() macro
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/cell/celleb_scc_sio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/celleb_scc_sio.c b/arch/powerpc/platforms/cell/celleb_scc_sio.c index 3a16c5b3c464..9c339ec646f5 100644 --- a/arch/powerpc/platforms/cell/celleb_scc_sio.c +++ b/arch/powerpc/platforms/cell/celleb_scc_sio.c @@ -42,14 +42,13 @@ static struct { static int __init txx9_serial_init(void) { extern int early_serial_txx9_setup(struct uart_port *port); - struct device_node *node = NULL; + struct device_node *node; int i; struct uart_port req; struct of_irq irq; struct resource res; - while ((node = of_find_compatible_node(node, - "serial", "toshiba,sio-scc")) != NULL) { + for_each_compatible_node(node, "serial", "toshiba,sio-scc") { for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) { if (!(txx9_serial_bitmap & (1<<i))) continue; |