From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-spi@vger.kernel.org>
Cc: <olteanv@gmail.com>, <han.xu@nxp.com>, <broonie@kernel.org>,
<yangyingliang@huawei.com>
Subject: [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
Date: Sat, 24 Sep 2022 21:18:52 +0800 [thread overview]
Message-ID: <20220924131854.964923-1-yangyingliang@huawei.com> (raw)
Use the devm_platform_get_and_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/spi/spi-fsl-dspi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index fd004c9db9dc..a33e547b7d39 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1294,8 +1294,7 @@ static int dspi_probe(struct platform_device *pdev)
else
ctlr->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(&pdev->dev, res);
+ base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(base)) {
ret = PTR_ERR(base);
goto out_ctlr_put;
--
2.25.1
next reply other threads:[~2022-09-24 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 13:18 Yang Yingliang [this message]
2022-09-24 13:18 ` [PATCH -next 2/3] spi: spi-fsl-lpspi: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
2022-09-24 13:18 ` [PATCH -next 3/3] spi: spi-fsl-qspi: Use devm_platform_ioremap_resource_byname() Yang Yingliang
2022-09-26 17:57 ` [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource() Vladimir Oltean
2022-09-27 10:34 ` Mark Brown
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=20220924131854.964923-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=broonie@kernel.org \
--cc=han.xu@nxp.com \
--cc=linux-spi@vger.kernel.org \
--cc=olteanv@gmail.com \
/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).