Commit d909451c authored by Yang Li's avatar Yang Li Committed by Mark Brown

spi: imx: Use devm_platform_get_and_ioremap_resource()

According to commit 890cc39a ("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: default avatarYang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230328062600.93160-1-yang.lee@linux.alibaba.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 87c61417
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment