summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/spi/spi-xilinx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 5dd3d1901412..8e6e3876aa9a 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -440,8 +440,7 @@ static int xilinx_spi_probe(struct platform_device *pdev)
xspi->bitbang.txrx_bufs = xilinx_spi_txrx_bufs;
init_completion(&xspi->done);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- xspi->regs = devm_ioremap_resource(&pdev->dev, res);
+ xspi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(xspi->regs))
return PTR_ERR(xspi->regs);