Commit 176ebf87 authored by Wei Yongjun's avatar Wei Yongjun Committed by Benjamin Herrenschmidt

powerpc/celleb: Use for_each_compatible_node() macro

Use for_each_compatible_node() macro instead of open coding it.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 7943b310
...@@ -42,14 +42,13 @@ static struct { ...@@ -42,14 +42,13 @@ static struct {
static int __init txx9_serial_init(void) static int __init txx9_serial_init(void)
{ {
extern int early_serial_txx9_setup(struct uart_port *port); extern int early_serial_txx9_setup(struct uart_port *port);
struct device_node *node = NULL; struct device_node *node;
int i; int i;
struct uart_port req; struct uart_port req;
struct of_irq irq; struct of_irq irq;
struct resource res; struct resource res;
while ((node = of_find_compatible_node(node, for_each_compatible_node(node, "serial", "toshiba,sio-scc") {
"serial", "toshiba,sio-scc")) != NULL) {
for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) { for (i = 0; i < ARRAY_SIZE(txx9_scc_tab); i++) {
if (!(txx9_serial_bitmap & (1<<i))) if (!(txx9_serial_bitmap & (1<<i)))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment