diff options
Diffstat (limited to 'drivers/tty/serial/uartlite.c')
-rw-r--r-- | drivers/tty/serial/uartlite.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 708eead850b0..b1c6bd3d483f 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c | |||
@@ -632,7 +632,8 @@ MODULE_DEVICE_TABLE(of, ulite_of_match); | |||
632 | 632 | ||
633 | static int ulite_probe(struct platform_device *pdev) | 633 | static int ulite_probe(struct platform_device *pdev) |
634 | { | 634 | { |
635 | struct resource *res, *res2; | 635 | struct resource *res; |
636 | int irq; | ||
636 | int id = pdev->id; | 637 | int id = pdev->id; |
637 | #ifdef CONFIG_OF | 638 | #ifdef CONFIG_OF |
638 | const __be32 *prop; | 639 | const __be32 *prop; |
@@ -646,11 +647,11 @@ static int ulite_probe(struct platform_device *pdev) | |||
646 | if (!res) | 647 | if (!res) |
647 | return -ENODEV; | 648 | return -ENODEV; |
648 | 649 | ||
649 | res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 650 | irq = platform_get_irq(pdev, 0); |
650 | if (!res2) | 651 | if (irq <= 0) |
651 | return -ENODEV; | 652 | return -ENXIO; |
652 | 653 | ||
653 | return ulite_assign(&pdev->dev, id, res->start, res2->start); | 654 | return ulite_assign(&pdev->dev, id, res->start, irq); |
654 | } | 655 | } |
655 | 656 | ||
656 | static int ulite_remove(struct platform_device *pdev) | 657 | static int ulite_remove(struct platform_device *pdev) |