diff options
Diffstat (limited to 'drivers/serial/timbuart.c')
-rw-r--r-- | drivers/serial/timbuart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c index 34b31da01d09..786ba85c170b 100644 --- a/drivers/serial/timbuart.c +++ b/drivers/serial/timbuart.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
28 | #include <linux/ioport.h> | 28 | #include <linux/ioport.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include "timbuart.h" | 31 | #include "timbuart.h" |
31 | 32 | ||
@@ -421,7 +422,7 @@ static struct uart_driver timbuart_driver = { | |||
421 | 422 | ||
422 | static int timbuart_probe(struct platform_device *dev) | 423 | static int timbuart_probe(struct platform_device *dev) |
423 | { | 424 | { |
424 | int err; | 425 | int err, irq; |
425 | struct timbuart_port *uart; | 426 | struct timbuart_port *uart; |
426 | struct resource *iomem; | 427 | struct resource *iomem; |
427 | 428 | ||
@@ -453,11 +454,12 @@ static int timbuart_probe(struct platform_device *dev) | |||
453 | uart->port.mapbase = iomem->start; | 454 | uart->port.mapbase = iomem->start; |
454 | uart->port.membase = NULL; | 455 | uart->port.membase = NULL; |
455 | 456 | ||
456 | uart->port.irq = platform_get_irq(dev, 0); | 457 | irq = platform_get_irq(dev, 0); |
457 | if (uart->port.irq < 0) { | 458 | if (irq < 0) { |
458 | err = -EINVAL; | 459 | err = -EINVAL; |
459 | goto err_register; | 460 | goto err_register; |
460 | } | 461 | } |
462 | uart->port.irq = irq; | ||
461 | 463 | ||
462 | tasklet_init(&uart->tasklet, timbuart_tasklet, (unsigned long)uart); | 464 | tasklet_init(&uart->tasklet, timbuart_tasklet, (unsigned long)uart); |
463 | 465 | ||