Merge tag 'dmaengine-4.21-rc1' of git://git.infradead.org/users/vkoul/slave-dma
[linux-2.6-block.git] / arch / powerpc / kernel / legacy_serial.c
index 5b9dce17f0c926c9f4c9c838a06658920086bcdb..7cea5978f21f000317240d5092b68bd2f1561e17 100644 (file)
@@ -192,7 +192,7 @@ static int __init add_legacy_soc_port(struct device_node *np,
        /* Add port, irq will be dealt with later. We passed a translated
         * IO port value. It will be fixed up later along with the irq
         */
-       if (tsi && !strcmp(tsi->type, "tsi-bridge"))
+       if (of_node_is_type(tsi, "tsi-bridge"))
                return add_legacy_port(np, -1, UPIO_TSI, addr, addr,
                                       0, legacy_port_flags, 0);
        else
@@ -400,8 +400,7 @@ void __init find_legacy_serial_ports(void)
        /* Next, fill our array with ISA ports */
        for_each_node_by_type(np, "serial") {
                struct device_node *isa = of_get_parent(np);
-               if (isa && (!strcmp(isa->name, "isa") ||
-                           !strcmp(isa->name, "lpc"))) {
+               if (of_node_name_eq(isa, "isa") || of_node_name_eq(isa, "lpc")) {
                        if (of_device_is_available(np)) {
                                index = add_legacy_isa_port(np, isa);
                                if (index >= 0 && np == stdout)
@@ -415,11 +414,12 @@ void __init find_legacy_serial_ports(void)
        /* Next, try to locate PCI ports */
        for (np = NULL; (np = of_find_all_nodes(np));) {
                struct device_node *pci, *parent = of_get_parent(np);
-               if (parent && !strcmp(parent->name, "isa")) {
+               if (of_node_name_eq(parent, "isa")) {
                        of_node_put(parent);
                        continue;
                }
-               if (strcmp(np->name, "serial") && strcmp(np->type, "serial")) {
+               if (!of_node_name_eq(np, "serial") &&
+                   !of_node_is_type(np, "serial")) {
                        of_node_put(parent);
                        continue;
                }