Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Benjamin Herrenschmidt
176ebf87 7943b310

+2 -3
+2 -3
arch/powerpc/platforms/cell/celleb_scc_sio.c
··· 42 42 static int __init txx9_serial_init(void) 43 43 { 44 44 extern int early_serial_txx9_setup(struct uart_port *port); 45 - struct device_node *node = NULL; 45 + struct device_node *node; 46 46 int i; 47 47 struct uart_port req; 48 48 struct of_irq irq; 49 49 struct resource res; 50 50 51 - while ((node = of_find_compatible_node(node, 52 - "serial", "toshiba,sio-scc")) != NULL) { 51 + for_each_compatible_node(node, "serial", "toshiba,sio-scc") { 53 52 for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) { 54 53 if (!(txx9_serial_bitmap & (1<<i))) 55 54 continue;