]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
TTY: hvsi: use for_each_compatible_node() macro
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 4 Dec 2012 05:16:18 +0000 (00:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2013 07:00:43 +0000 (23:00 -0800)
Use for_each_compatible_node() macro instead of open coding it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvsi.c

index dc591290120b3b2ab11008b3055c96744dc70fd0..ef95a154854abc9622999df1f5248e683e3d85d5 100644 (file)
@@ -1183,9 +1183,7 @@ static int __init hvsi_console_init(void)
        hvsi_wait = poll_for_state; /* no irqs yet; must poll */
 
        /* search device tree for vty nodes */
-       for (vty = of_find_compatible_node(NULL, "serial", "hvterm-protocol");
-                       vty != NULL;
-                       vty = of_find_compatible_node(vty, "serial", "hvterm-protocol")) {
+       for_each_compatible_node(vty, "serial", "hvterm-protocol") {
                struct hvsi_struct *hp;
                const uint32_t *vtermno, *irq;