lkml.org 
[lkml]   [2012]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH -next] xtensa: use for_each_compatible_node() macro
From
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use for_each_compatible_node() macro.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.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;
}



\
 
 \ /
  Last update: 2012-12-02 13:41    [W:0.053 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site