Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sparc32, leon: APBUART driver must use archdata to get IRQ number

See Commit id 1636f8ac2b08410df4766449f7c86b912443cd99 (sparc/of:
Move of_device fields into struct pdev_archdata), this patch
is similar to 19e4875fb21a69fbf620e84769a74d189c69c58d (of/sparc:
fix build regression from of_device changes)

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Daniel Hellstrom and committed by
David S. Miller
10544f12 97c278e3

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