Use for_each_compatible_node() macro.
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 3 Dec 2012 08:35:11 +0000 (00:35 -0800)
committerChris Zankel <chris@zankel.net>
Wed, 19 Dec 2012 05:10:25 +0000 (21:10 -0800)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
arch/xtensa/platforms/xtfpga/setup.c

index 71d61ca..237c36d 100644 (file)
@@ -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;
 }