aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/legacy_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/legacy_serial.c')
-rw-r--r--arch/powerpc/kernel/legacy_serial.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 5b9dce17f0c9..7cea5978f21f 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -192,7 +192,7 @@ static int __init add_legacy_soc_port(struct device_node *np,
192 /* Add port, irq will be dealt with later. We passed a translated 192 /* Add port, irq will be dealt with later. We passed a translated
193 * IO port value. It will be fixed up later along with the irq 193 * IO port value. It will be fixed up later along with the irq
194 */ 194 */
195 if (tsi && !strcmp(tsi->type, "tsi-bridge")) 195 if (of_node_is_type(tsi, "tsi-bridge"))
196 return add_legacy_port(np, -1, UPIO_TSI, addr, addr, 196 return add_legacy_port(np, -1, UPIO_TSI, addr, addr,
197 0, legacy_port_flags, 0); 197 0, legacy_port_flags, 0);
198 else 198 else
@@ -400,8 +400,7 @@ void __init find_legacy_serial_ports(void)
400 /* Next, fill our array with ISA ports */ 400 /* Next, fill our array with ISA ports */
401 for_each_node_by_type(np, "serial") { 401 for_each_node_by_type(np, "serial") {
402 struct device_node *isa = of_get_parent(np); 402 struct device_node *isa = of_get_parent(np);
403 if (isa && (!strcmp(isa->name, "isa") || 403 if (of_node_name_eq(isa, "isa") || of_node_name_eq(isa, "lpc")) {
404 !strcmp(isa->name, "lpc"))) {
405 if (of_device_is_available(np)) { 404 if (of_device_is_available(np)) {
406 index = add_legacy_isa_port(np, isa); 405 index = add_legacy_isa_port(np, isa);
407 if (index >= 0 && np == stdout) 406 if (index >= 0 && np == stdout)
@@ -415,11 +414,12 @@ void __init find_legacy_serial_ports(void)
415 /* Next, try to locate PCI ports */ 414 /* Next, try to locate PCI ports */
416 for (np = NULL; (np = of_find_all_nodes(np));) { 415 for (np = NULL; (np = of_find_all_nodes(np));) {
417 struct device_node *pci, *parent = of_get_parent(np); 416 struct device_node *pci, *parent = of_get_parent(np);
418 if (parent && !strcmp(parent->name, "isa")) { 417 if (of_node_name_eq(parent, "isa")) {
419 of_node_put(parent); 418 of_node_put(parent);
420 continue; 419 continue;
421 } 420 }
422 if (strcmp(np->name, "serial") && strcmp(np->type, "serial")) { 421 if (!of_node_name_eq(np, "serial") &&
422 !of_node_is_type(np, "serial")) {
423 of_node_put(parent); 423 of_node_put(parent);
424 continue; 424 continue;
425 } 425 }