DMA Engine development
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: Vinod Koul <vkoul@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Yangtao Li <frank.li@vivo.com>,
	dmaengine@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource()
Date: Wed,  5 Jul 2023 16:18:56 +0800	[thread overview]
Message-ID: <20230705081856.13734-5-frank.li@vivo.com> (raw)
In-Reply-To: <20230705081856.13734-1-frank.li@vivo.com>

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>
---
 drivers/dma/stm32-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c
index 37674029cb42..5c36811aa134 100644
--- a/drivers/dma/stm32-dma.c
+++ b/drivers/dma/stm32-dma.c
@@ -1581,8 +1581,7 @@ static int stm32_dma_probe(struct platform_device *pdev)
 
 	dd = &dmadev->ddev;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	dmadev->base = devm_ioremap_resource(&pdev->dev, res);
+	dmadev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(dmadev->base))
 		return PTR_ERR(dmadev->base);
 
-- 
2.39.0


  parent reply	other threads:[~2023-07-05  8:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-05  8:18 [PATCH 1/5] dmaengine: qcom: gpi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-05  8:18 ` [PATCH 2/5] dmaengine: qcom_hidma: " Yangtao Li
2023-07-05  8:18 ` [PATCH 3/5] dmaengine: qcom: hidma_mgmt: " Yangtao Li
2023-07-05  8:18 ` [PATCH 4/5] dmaengine: shdmac: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-05  8:18 ` Yangtao Li [this message]
2023-07-06  7:33   ` [Linux-stm32] [PATCH 5/5] dmaengine: stm32-dma: Use devm_platform_get_and_ioremap_resource() Amelie Delaunay
2023-07-11 16:43 ` [PATCH 1/5] dmaengine: qcom: gpi: " Vinod Koul
2023-07-12  9:33   ` Geert Uytterhoeven
2023-07-12 11:30     ` Vinod Koul
2023-07-13  8:00       ` Geert Uytterhoeven
2023-07-13 17:52         ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230705081856.13734-5-frank.li@vivo.com \
    --to=frank.li@vivo.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox