powerpc: Check "status" property before adding legacy ISA serial ports
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 15 Jul 2013 03:03:13 +0000 (13:03 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 04:58:21 +0000 (14:58 +1000)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/legacy_serial.c

index 9a4d9fe..c9c469f 100644 (file)
@@ -386,9 +386,11 @@ void __init find_legacy_serial_ports(void)
                struct device_node *isa = of_get_parent(np);
                if (isa && (!strcmp(isa->name, "isa") ||
                            !strcmp(isa->name, "lpc"))) {
-                       index = add_legacy_isa_port(np, isa);
-                       if (index >= 0 && np == stdout)
-                               legacy_serial_console = index;
+                       if (of_device_is_available(np)) {
+                               index = add_legacy_isa_port(np, isa);
+                               if (index >= 0 && np == stdout)
+                                       legacy_serial_console = index;
+                       }
                }
                of_node_put(isa);
        }