- /* consider only the first vty node.
- * we should _always_ be able to find one. */
- vty = of_find_node_by_name(NULL, "vty");
- if (vty && device_is_compatible(vty, "hvterm1")) {
- u32 *termno = (u32 *)get_property(vty, "reg", NULL);
+ for (vty = of_find_node_by_name(NULL, "vty"); vty != NULL;
+ vty = of_find_node_by_name(vty, "vty")) {
+ uint32_t *vtermno;
+
+ /* We have statically defined space for only a certain number of
+ * console adapters. */
+ if (num_found >= MAX_NR_HVC_CONSOLES)
+ break;