if (!opal)
                        return;
                for_each_child_of_node(opal, np) {
-                       if (!strcmp(np->name, "serial")) {
+                       if (of_node_name_eq(np, "serial")) {
                                stdout_node = np;
                                break;
                        }
 
 void __init hvc_vio_init_early(void)
 {
        const __be32 *termno;
-       const char *name;
        const struct hv_ops *ops;
 
        /* find the boot console from /chosen/stdout */
-       if (!of_stdout)
-               return;
-       name = of_get_property(of_stdout, "name", NULL);
-       if (!name) {
-               printk(KERN_WARNING "stdout node missing 'name' property!\n");
-               return;
-       }
-
        /* Check if it's a virtual terminal */
-       if (strncmp(name, "vty", 3) != 0)
+       if (!of_node_name_prefix(of_stdout, "vty"))
                return;
        termno = of_get_property(of_stdout, "reg", NULL);
        if (termno == NULL)
 
                 */
                node_a = node_b = NULL;
                for (np = NULL; (np = of_get_next_child(node_p, np)) != NULL;) {
-                       if (strncmp(np->name, "ch-a", 4) == 0)
+                       if (of_node_name_prefix(np, "ch-a"))
                                node_a = of_node_get(np);
-                       else if (strncmp(np->name, "ch-b", 4) == 0)
+                       else if (of_node_name_prefix(np, "ch-b"))
                                node_b = of_node_get(np);
                }
                if (!node_a && !node_b) {
 
        int baud, bits, stop, cflag;
        char parity;
 
-       if (!strcmp(uart_dp->name, "rsc") ||
-           !strcmp(uart_dp->name, "rsc-console") ||
-           !strcmp(uart_dp->name, "rsc-control")) {
+       if (of_node_name_eq(uart_dp, "rsc") ||
+           of_node_name_eq(uart_dp, "rsc-console") ||
+           of_node_name_eq(uart_dp, "rsc-control")) {
                mode = of_get_property(uart_dp,
                                       "ssp-console-modes", NULL);
                if (!mode)
                        mode = "115200,8,n,1,-";
-       } else if (!strcmp(uart_dp->name, "lom-console")) {
+       } else if (of_node_name_eq(uart_dp, "lom-console")) {
                mode = "9600,8,n,1,-";
        } else {
                struct device_node *dp;
 
        up->port.ops = &sunsu_pops;
 
        ignore_line = false;
-       if (!strcmp(dp->name, "rsc-console") ||
-           !strcmp(dp->name, "lom-console"))
+       if (of_node_name_eq(dp, "rsc-console") ||
+           of_node_name_eq(dp, "lom-console"))
                ignore_line = true;
 
        sunserial_console_match(SUNSU_CONSOLE(), dp,