Skip to content

Commit

Permalink
tty: serial: omap: switch over to platform_get_resource
Browse files Browse the repository at this point in the history
this way we can remove one pointer declaration.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Apr 24, 2014
1 parent cc51638 commit 54af692
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,7 +1644,6 @@ static int serial_omap_probe(struct platform_device *pdev)
struct omap_uart_port_info *omap_up_info = dev_get_platdata(&pdev->dev);
struct uart_omap_port *up;
struct resource *mem;
struct resource *irq;
int uartirq = 0;
int wakeirq = 0;
int ret;
Expand All @@ -1658,12 +1657,9 @@ static int serial_omap_probe(struct platform_device *pdev)
omap_up_info = of_get_uart_port_info(&pdev->dev);
pdev->dev.platform_data = omap_up_info;
} else {
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!irq) {
dev_err(&pdev->dev, "no irq resource?\n");
return -ENODEV;
}
uartirq = irq->start;
uartirq = platform_get_irq(pdev, 0);
if (uartirq < 0)
return -EPROBE_DEFER;
}

mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down

0 comments on commit 54af692

Please sign in to comment.