Skip to content

Commit

Permalink
tty/hvsi: Use for_each_compatible_node() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Benjamin Herrenschmidt committed Jan 10, 2013
1 parent a413f47 commit 7943b31
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/tty/hvc/hvsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7943b31

Please sign in to comment.