Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Benjamin Herrenschmidt
7943b310 a413f474

+1 -3
+1 -3
drivers/tty/hvc/hvsi.c
··· 1187 1187 hvsi_wait = poll_for_state; /* no irqs yet; must poll */ 1188 1188 1189 1189 /* search device tree for vty nodes */ 1190 - for (vty = of_find_compatible_node(NULL, "serial", "hvterm-protocol"); 1191 - vty != NULL; 1192 - vty = of_find_compatible_node(vty, "serial", "hvterm-protocol")) { 1190 + for_each_compatible_node(vty, "serial", "hvterm-protocol") { 1193 1191 struct hvsi_struct *hp; 1194 1192 const uint32_t *vtermno, *irq; 1195 1193