diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2023-03-28 09:26:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-04-04 14:46:54 +0300 |
commit | d909451ce1db59ba0281fc65ee03d8933d623574 (patch) | |
tree | e8931b662cdbc4ee158a93f00e55ba670b1a54c5 | |
parent | 87c614175bbf28d3fd076dc2d166bac759e41427 (diff) | |
download | linux-d909451ce1db59ba0281fc65ee03d8933d623574.tar.xz |
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>
-rw-r--r-- | drivers/spi/spi-imx.c | 3 |
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; |