diff options
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/apbuart.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c index 1ab999b04ef3..12d4e7ca53ca 100644 --- a/drivers/tty/serial/apbuart.c +++ b/drivers/tty/serial/apbuart.c | |||
@@ -555,10 +555,9 @@ static struct uart_driver grlib_apbuart_driver = { | |||
555 | 555 | ||
556 | static int __devinit apbuart_probe(struct platform_device *op) | 556 | static int __devinit apbuart_probe(struct platform_device *op) |
557 | { | 557 | { |
558 | int i = -1; | 558 | int i; |
559 | struct uart_port *port = NULL; | 559 | struct uart_port *port = NULL; |
560 | 560 | ||
561 | i = 0; | ||
562 | for (i = 0; i < grlib_apbuart_port_nr; i++) { | 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { |
563 | if (op->dev.of_node == grlib_apbuart_nodes[i]) | 562 | if (op->dev.of_node == grlib_apbuart_nodes[i]) |
564 | break; | 563 | break; |
@@ -566,6 +565,7 @@ static int __devinit apbuart_probe(struct platform_device *op) | |||
566 | 565 | ||
567 | port = &grlib_apbuart_ports[i]; | 566 | port = &grlib_apbuart_ports[i]; |
568 | port->dev = &op->dev; | 567 | port->dev = &op->dev; |
568 | port->irq = op->archdata.irqs[0]; | ||
569 | 569 | ||
570 | uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); | 570 | uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port); |
571 | 571 | ||
@@ -615,7 +615,7 @@ static int grlib_apbuart_configure(void) | |||
615 | freq_khz = *prop; | 615 | freq_khz = *prop; |
616 | 616 | ||
617 | for_each_matching_node(np, apbuart_match) { | 617 | for_each_matching_node(np, apbuart_match) { |
618 | const int *irqs, *ampopts; | 618 | const int *ampopts; |
619 | const struct amba_prom_registers *regs; | 619 | const struct amba_prom_registers *regs; |
620 | struct uart_port *port; | 620 | struct uart_port *port; |
621 | unsigned long addr; | 621 | unsigned long addr; |
@@ -623,11 +623,9 @@ static int grlib_apbuart_configure(void) | |||
623 | ampopts = of_get_property(np, "ampopts", NULL); | 623 | ampopts = of_get_property(np, "ampopts", NULL); |
624 | if (ampopts && (*ampopts == 0)) | 624 | if (ampopts && (*ampopts == 0)) |
625 | continue; /* Ignore if used by another OS instance */ | 625 | continue; /* Ignore if used by another OS instance */ |
626 | |||
627 | irqs = of_get_property(np, "interrupts", NULL); | ||
628 | regs = of_get_property(np, "reg", NULL); | 626 | regs = of_get_property(np, "reg", NULL); |
629 | 627 | ||
630 | if (!irqs || !regs) | 628 | if (!regs) |
631 | continue; | 629 | continue; |
632 | 630 | ||
633 | grlib_apbuart_nodes[line] = np; | 631 | grlib_apbuart_nodes[line] = np; |
@@ -638,7 +636,7 @@ static int grlib_apbuart_configure(void) | |||
638 | 636 | ||
639 | port->mapbase = addr; | 637 | port->mapbase = addr; |
640 | port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); | 638 | port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map)); |
641 | port->irq = *irqs; | 639 | port->irq = 0; |
642 | port->iotype = UPIO_MEM; | 640 | port->iotype = UPIO_MEM; |
643 | port->ops = &grlib_apbuart_ops; | 641 | port->ops = &grlib_apbuart_ops; |
644 | port->flags = UPF_BOOT_AUTOCONF; | 642 | port->flags = UPF_BOOT_AUTOCONF; |