Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123133
b: refs/heads/master
c: 418441d
h: refs/heads/master
i:
  123131: ad57efc
v: v3
  • Loading branch information
Wolfram Sang authored and Grant Likely committed Dec 21, 2008
1 parent c18a03d commit c71a0a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: aec739e010f8163eac225f4e331ac7fbd59ac5c8
refs/heads/master: 418441d9ebe84b205cb23eb0ab214c1f991621fe
23 changes: 15 additions & 8 deletions trunk/drivers/serial/mpc52xx_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,22 +1148,29 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
return ret;

port->mapbase = res.start;
if (!port->mapbase) {
dev_dbg(&op->dev, "Could not allocate resources for PSC\n");
return -EINVAL;
}

port->irq = irq_of_parse_and_map(op->node, 0);
if (port->irq == NO_IRQ) {
dev_dbg(&op->dev, "Could not get irq\n");
return -EINVAL;
}

dev_dbg(&op->dev, "mpc52xx-psc uart at %p, irq=%x, freq=%i\n",
(void *)port->mapbase, port->irq, port->uartclk);

if ((port->irq == NO_IRQ) || !port->mapbase) {
printk(KERN_ERR "Could not allocate resources for PSC\n");
return -EINVAL;
}

/* Add the port to the uart sub-system */
ret = uart_add_one_port(&mpc52xx_uart_driver, port);
if (!ret)
dev_set_drvdata(&op->dev, (void *)port);
if (ret) {
irq_dispose_mapping(port->irq);
return ret;
}

return ret;
dev_set_drvdata(&op->dev, (void *)port);
return 0;
}

static int
Expand Down

0 comments on commit c71a0a1

Please sign in to comment.