summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-12-03 19:16:18 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2013-01-10 06:00:45 (GMT)
commit7943b310001fd7858154bc3af2a78e0dd6bfea03 (patch)
treef7c37025993a625213c08a89621cf7152bcb94b2
parenta413f474a0ff29404bf1af5c024215476ed6ca01 (diff)
downloadlinux-7943b310001fd7858154bc3af2a78e0dd6bfea03.tar.xz
tty/hvsi: Use for_each_compatible_node() macro
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--drivers/tty/hvc/hvsi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c
index 68357a6..60ecdd5 100644
--- a/drivers/tty/hvc/hvsi.c
+++ b/drivers/tty/hvc/hvsi.c
@@ -1187,9 +1187,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;