From patchwork Wed Sep 4 08:24:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 11129599 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8C5E1920 for ; Wed, 4 Sep 2019 08:24:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB60123400 for ; Wed, 4 Sep 2019 08:24:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729452AbfIDIYm (ORCPT ); Wed, 4 Sep 2019 04:24:42 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:52203 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725966AbfIDIYm (ORCPT ); Wed, 4 Sep 2019 04:24:42 -0400 X-IronPort-AV: E=Sophos;i="5.64,465,1559487600"; d="scan'208";a="25494499" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 04 Sep 2019 17:24:39 +0900 Received: from localhost.localdomain (unknown [10.166.17.210]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 390E44008C72; Wed, 4 Sep 2019 17:24:39 +0900 (JST) From: Yoshihiro Shimoda To: vkoul@kernel.org Cc: dmaengine@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH v2 2/3] dmaengine: rcar-dmac: Use devm_platform_ioremap_resource() Date: Wed, 4 Sep 2019 17:24:37 +0900 Message-Id: <1567585478-23902-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567585478-23902-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1567585478-23902-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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 Reviewed-by: Geert Uytterhoeven --- drivers/dma/sh/rcar-dmac.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 74996a0..542786d 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -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);