[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd9t6uOt-2+0ZcqSPw1UcS1RXgX9UMWbgPRpu_-+s6A9xQ@mail.gmail.com>
Date: Sun, 2 Dec 2012 07:05:01 -0500
From: Wei Yongjun <weiyj.lk@...il.com>
To: chris@...kel.net, jcmvbkbc@...il.com
Cc: yongjun_wei@...ndmicro.com.cn, linux-xtensa@...ux-xtensa.org,
linux-kernel@...r.kernel.org
Subject: [PATCH -next] xtensa: use for_each_compatible_node() macro
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
Use for_each_compatible_node() macro.
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
arch/xtensa/platforms/xtfpga/setup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/xtensa/platforms/xtfpga/setup.c b/arch/xtensa/platforms/xtfpga/setup.c
index 71d61ca6..237c36d 100644
--- a/arch/xtensa/platforms/xtfpga/setup.c
+++ b/arch/xtensa/platforms/xtfpga/setup.c
@@ -105,9 +105,9 @@ static void __init update_clock_frequency(struct device_node *node)
static int __init machine_setup(void)
{
- struct device_node *serial = NULL;
+ struct device_node *serial;
- while ((serial = of_find_compatible_node(serial, NULL, "ns16550a")))
+ for_each_compatible_node(serial, NULL, "ns16550a")
update_clock_frequency(serial);
return 0;
}
--
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