Commit e93c47a3 authored by Yangtao Li's avatar Yangtao Li Committed by Vinod Koul

dmaengine: qcom: gpi: Use 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 avatarYangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230705081856.13734-1-frank.li@vivo.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent c6ec8c83
......@@ -2160,8 +2160,7 @@ static int gpi_probe(struct platform_device *pdev)
return -ENOMEM;
gpi_dev->dev = &pdev->dev;
gpi_dev->res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
gpi_dev->regs = devm_ioremap_resource(gpi_dev->dev, gpi_dev->res);
gpi_dev->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &gpi_dev->res);
if (IS_ERR(gpi_dev->regs))
return PTR_ERR(gpi_dev->regs);
gpi_dev->ee_base = gpi_dev->regs;
......
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