Skip to content

Commit

Permalink
dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource()
Browse files Browse the repository at this point in the history
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: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230705081856.13734-1-frank.li@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Yangtao Li authored and Vinod Koul committed Jul 12, 2023
1 parent c6ec8c8 commit e93c47a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/dma/qcom/gpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e93c47a

Please sign in to comment.