Skip to content

Commit

Permalink
dmaengine: qcom: hidma_mgmt: Use devm_platform_get_and_ioremap_resour…
Browse files Browse the repository at this point in the history
…ce()

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-3-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 f1e47b8 commit 1dedb81
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/dma/qcom/hidma_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,9 @@ static int hidma_mgmt_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
virtaddr = devm_ioremap_resource(&pdev->dev, res);
virtaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(virtaddr)) {
rc = -ENOMEM;
rc = PTR_ERR(virtaddr);
goto out;
}

Expand Down

0 comments on commit 1dedb81

Please sign in to comment.