From: Markus Elfring <Markus.Elfring@web.de>
To: dmaengine@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Paul Cercueil <paul@crapouillou.net>,
Vinod Koul <vkoul@kernel.org>,
Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
Alex Smith <alex.smith@imgtec.com>
Subject: [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe()
Date: Sun, 22 Sep 2019 11:25:20 +0200 [thread overview]
Message-ID: <5dd19f28-349a-4957-ea3a-6aebbd7c97e2@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 22 Sep 2019 11:18:27 +0200
Simplify this function implementation a bit by using
a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/dma/dma-jz4780.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index cafb1cc065bb..f42b3ef8e036 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -858,13 +858,7 @@ static int jz4780_dma_probe(struct platform_device *pdev)
jzdma->soc_data = soc_data;
platform_set_drvdata(pdev, jzdma);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "failed to get I/O memory\n");
- return -EINVAL;
- }
-
- jzdma->chn_base = devm_ioremap_resource(dev, res);
+ jzdma->chn_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(jzdma->chn_base))
return PTR_ERR(jzdma->chn_base);
--
2.23.0
next reply other threads:[~2019-09-22 9:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-22 9:25 Markus Elfring [this message]
2019-09-24 19:32 ` [PATCH] dmaengine: jz4780: Use devm_platform_ioremap_resource() in jz4780_dma_probe() Paul Cercueil
2019-10-14 7:14 ` Vinod Koul
2019-10-14 13:05 ` Paul Cercueil
2019-10-14 7: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=5dd19f28-349a-4957-ea3a-6aebbd7c97e2@web.de \
--to=markus.elfring@web.de \
--cc=Zubair.Kakakhel@imgtec.com \
--cc=alex.smith@imgtec.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@crapouillou.net \
--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;
as well as URLs for NNTP newsgroup(s).