Commit f228a4a2 authored by Baolin Wang's avatar Baolin Wang Committed by Vinod Koul

dmaengine: sprd: Change to use devm_platform_ioremap_resource()

Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together, which can simpify the code.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Link: https://lore.kernel.org/r/1af3efdac3b217203cace090c8947386854c0144.1569554639.git.baolin.wang@linaro.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 944879ba
...@@ -1057,7 +1057,6 @@ static int sprd_dma_probe(struct platform_device *pdev) ...@@ -1057,7 +1057,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct sprd_dma_dev *sdev; struct sprd_dma_dev *sdev;
struct sprd_dma_chn *dma_chn; struct sprd_dma_chn *dma_chn;
struct resource *res;
u32 chn_count; u32 chn_count;
int ret, i; int ret, i;
...@@ -1103,8 +1102,7 @@ static int sprd_dma_probe(struct platform_device *pdev) ...@@ -1103,8 +1102,7 @@ static int sprd_dma_probe(struct platform_device *pdev)
dev_warn(&pdev->dev, "no interrupts for the dma controller\n"); dev_warn(&pdev->dev, "no interrupts for the dma controller\n");
} }
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); sdev->glb_base = devm_platform_ioremap_resource(pdev, 0);
sdev->glb_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(sdev->glb_base)) if (IS_ERR(sdev->glb_base))
return PTR_ERR(sdev->glb_base); return PTR_ERR(sdev->glb_base);
......
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