From: Benjamin Herrenschmidt Date: Mon, 15 Jul 2013 03:03:13 +0000 (+1000) Subject: powerpc: Check "status" property before adding legacy ISA serial ports X-Git-Tag: v3.12-rc1~123^2~78 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e0f5fa99a378d6910d234f3c8998aebfe2f54745;p=linux.git powerpc: Check "status" property before adding legacy ISA serial ports Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index 9a4d9fe9ff1c..c9c469f3c5c3 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -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); }