diff mbox series

[2/2] dmaengine: rcar-dmac: Use devm_platform_ioremap_resource()

Message ID 1566904231-25486-3-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
State Changes Requested
Headers show
Series dmaengine: rcar-dmac: minor modifications | expand

Commit Message

Yoshihiro Shimoda Aug. 27, 2019, 11:10 a.m. UTC
This patch uses devm_platform_ioremap_resource() instead of
using platform_get_resource() and devm_ioremap_resource() together
to simplify.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/dma/sh/rcar-dmac.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Geert Uytterhoeven Aug. 27, 2019, 1:10 p.m. UTC | #1
On Tue, Aug 27, 2019 at 1:12 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> This patch uses devm_platform_ioremap_resource() instead of
> using platform_get_resource() and devm_ioremap_resource() together
> to simplify.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert
diff mbox series

Patch

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 1ff6d81..779b715 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1814,7 +1814,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;
 
@@ -1855,8 +1854,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);