Commit d832c481 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Vinod Koul

dmaengine: rcar-dmac: Use devm_platform_ioremap_resource()

This patch uses devm_platform_ioremap_resource() instead of
using platform_get_resource() and devm_ioremap_resource() together
to simplify.
Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
Link: https://lore.kernel.org/r/1568010892-17606-4-git-send-email-yoshihiro.shimoda.uh@renesas.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 2df4a02a
......@@ -1824,7 +1824,6 @@ static int rcar_dmac_probe(struct platform_device *pdev)
struct dma_device *engine;
struct rcar_dmac *dmac;
const struct rcar_dmac_of_data *data;
struct resource *mem;
unsigned int i;
int ret;
......@@ -1863,8 +1862,7 @@ static int rcar_dmac_probe(struct platform_device *pdev)
return -ENOMEM;
/* Request resources. */
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dmac->iomem = devm_ioremap_resource(&pdev->dev, mem);
dmac->iomem = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(dmac->iomem))
return PTR_ERR(dmac->iomem);
......
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