.. | .. |
---|
192 | 192 | /* Add port, irq will be dealt with later. We passed a translated |
---|
193 | 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 | 196 | return add_legacy_port(np, -1, UPIO_TSI, addr, addr, |
---|
197 | 197 | 0, legacy_port_flags, 0); |
---|
198 | 198 | else |
---|
.. | .. |
---|
400 | 400 | /* Next, fill our array with ISA ports */ |
---|
401 | 401 | for_each_node_by_type(np, "serial") { |
---|
402 | 402 | struct device_node *isa = of_get_parent(np); |
---|
403 | | - if (isa && (!strcmp(isa->name, "isa") || |
---|
404 | | - !strcmp(isa->name, "lpc"))) { |
---|
| 403 | + if (of_node_name_eq(isa, "isa") || of_node_name_eq(isa, "lpc")) { |
---|
405 | 404 | if (of_device_is_available(np)) { |
---|
406 | 405 | index = add_legacy_isa_port(np, isa); |
---|
407 | 406 | if (index >= 0 && np == stdout) |
---|
.. | .. |
---|
415 | 414 | /* Next, try to locate PCI ports */ |
---|
416 | 415 | for (np = NULL; (np = of_find_all_nodes(np));) { |
---|
417 | 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 | 418 | of_node_put(parent); |
---|
420 | 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 | 423 | of_node_put(parent); |
---|
424 | 424 | continue; |
---|
425 | 425 | } |
---|
.. | .. |
---|
479 | 479 | port->irq = virq; |
---|
480 | 480 | |
---|
481 | 481 | #ifdef CONFIG_SERIAL_8250_FSL |
---|
482 | | - if (of_device_is_compatible(np, "fsl,ns16550")) |
---|
| 482 | + if (of_device_is_compatible(np, "fsl,ns16550")) { |
---|
483 | 483 | port->handle_irq = fsl8250_handle_irq; |
---|
| 484 | + port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE); |
---|
| 485 | + } |
---|
484 | 486 | #endif |
---|
485 | 487 | } |
---|
486 | 488 | |
---|