Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243573
b: refs/heads/master
c: 10544f1
h: refs/heads/master
i:
  243571: 073abdd
v: v3
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Mar 30, 2011
1 parent 25e434c commit 7d97ae6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97c278e31c7c3e10a3288b53f1b0a1733eacec5a
refs/heads/master: 10544f128c338aeb7f63c002ad7eee67aa0e6acf
12 changes: 5 additions & 7 deletions trunk/drivers/tty/serial/apbuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,17 +555,17 @@ static struct uart_driver grlib_apbuart_driver = {

static int __devinit apbuart_probe(struct platform_device *op)
{
int i = -1;
int i;
struct uart_port *port = NULL;

i = 0;
for (i = 0; i < grlib_apbuart_port_nr; i++) {
if (op->dev.of_node == grlib_apbuart_nodes[i])
break;
}

port = &grlib_apbuart_ports[i];
port->dev = &op->dev;
port->irq = op->archdata.irqs[0];

uart_add_one_port(&grlib_apbuart_driver, (struct uart_port *) port);

Expand Down Expand Up @@ -615,19 +615,17 @@ static int grlib_apbuart_configure(void)
freq_khz = *prop;

for_each_matching_node(np, apbuart_match) {
const int *irqs, *ampopts;
const int *ampopts;
const struct amba_prom_registers *regs;
struct uart_port *port;
unsigned long addr;

ampopts = of_get_property(np, "ampopts", NULL);
if (ampopts && (*ampopts == 0))
continue; /* Ignore if used by another OS instance */

irqs = of_get_property(np, "interrupts", NULL);
regs = of_get_property(np, "reg", NULL);

if (!irqs || !regs)
if (!regs)
continue;

grlib_apbuart_nodes[line] = np;
Expand All @@ -638,7 +636,7 @@ static int grlib_apbuart_configure(void)

port->mapbase = addr;
port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
port->irq = *irqs;
port->irq = 0;
port->iotype = UPIO_MEM;
port->ops = &grlib_apbuart_ops;
port->flags = UPF_BOOT_AUTOCONF;
Expand Down

0 comments on commit 7d97ae6

Please sign in to comment.