summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-imx.c
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2023-03-28 14:26:00 +0800
committerMark Brown <broonie@kernel.org>2023-04-04 12:46:54 +0100
commitd909451ce1db59ba0281fc65ee03d8933d623574 (patch)
treee8931b662cdbc4ee158a93f00e55ba670b1a54c5 /drivers/spi/spi-imx.c
parent87c614175bbf28d3fd076dc2d166bac759e41427 (diff)
downloadlwn-d909451ce1db59ba0281fc65ee03d8933d623574.tar.gz
lwn-d909451ce1db59ba0281fc65ee03d8933d623574.zip
spi: imx: Use devm_platform_get_and_ioremap_resource()
According to commit 890cc39a8799 ("drivers: provide devm_platform_get_and_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/20230328062600.93160-1-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-imx.c')
-rw-r--r--drivers/spi/spi-imx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
index 24390c702c60..34e5f81ec431 100644
--- a/drivers/spi/spi-imx.c
+++ b/drivers/spi/spi-imx.c
@@ -1765,8 +1765,7 @@ static int spi_imx_probe(struct platform_device *pdev)
init_completion(&spi_imx->xfer_done);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- spi_imx->base = devm_ioremap_resource(&pdev->dev, res);
+ spi_imx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(spi_imx->base)) {
ret = PTR_ERR(spi_imx->base);
goto out_controller_put;