[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd-QN0vH3F+Ws8DMrjZOh5vvsjEB0tMOUGFjqtbuwksn-g@mail.gmail.com>
Date: Tue, 4 Dec 2012 00:17:01 -0500
From: Wei Yongjun <weiyj.lk@...il.com>
To: arnd@...db.de, benh@...nel.crashing.org, paulus@...ba.org
Cc: yongjun_wei@...ndmicro.com.cn, linuxppc-dev@...ts.ozlabs.org,
cbe-oss-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH -next] [POWERPC] celleb: use for_each_compatible_node() macro
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
Use for_each_compatible_node() macro instead of open coding it.
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
arch/powerpc/platforms/cell/celleb_scc_sio.c | 5 ++---
1 file 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 3a16c5b..75d71a7 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists