aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/xilinx_uartps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/xilinx_uartps.c')
-rw-r--r--drivers/tty/serial/xilinx_uartps.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index f218ec658f5d..3ddbac767db3 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -1331,9 +1331,9 @@ static SIMPLE_DEV_PM_OPS(cdns_uart_dev_pm_ops, cdns_uart_suspend,
1331 */ 1331 */
1332static int cdns_uart_probe(struct platform_device *pdev) 1332static int cdns_uart_probe(struct platform_device *pdev)
1333{ 1333{
1334 int rc, id; 1334 int rc, id, irq;
1335 struct uart_port *port; 1335 struct uart_port *port;
1336 struct resource *res, *res2; 1336 struct resource *res;
1337 struct cdns_uart *cdns_uart_data; 1337 struct cdns_uart *cdns_uart_data;
1338 1338
1339 cdns_uart_data = devm_kzalloc(&pdev->dev, sizeof(*cdns_uart_data), 1339 cdns_uart_data = devm_kzalloc(&pdev->dev, sizeof(*cdns_uart_data),
@@ -1380,9 +1380,9 @@ static int cdns_uart_probe(struct platform_device *pdev)
1380 goto err_out_clk_disable; 1380 goto err_out_clk_disable;
1381 } 1381 }
1382 1382
1383 res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1383 irq = platform_get_irq(pdev, 0);
1384 if (!res2) { 1384 if (irq <= 0) {
1385 rc = -ENODEV; 1385 rc = -ENXIO;
1386 goto err_out_clk_disable; 1386 goto err_out_clk_disable;
1387 } 1387 }
1388 1388
@@ -1411,7 +1411,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
1411 * and triggers invocation of the config_port() entry point. 1411 * and triggers invocation of the config_port() entry point.
1412 */ 1412 */
1413 port->mapbase = res->start; 1413 port->mapbase = res->start;
1414 port->irq = res2->start; 1414 port->irq = irq;
1415 port->dev = &pdev->dev; 1415 port->dev = &pdev->dev;
1416 port->uartclk = clk_get_rate(cdns_uart_data->uartclk); 1416 port->uartclk = clk_get_rate(cdns_uart_data->uartclk);
1417 port->private_data = cdns_uart_data; 1417 port->private_data = cdns_uart_data;