From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-spi@vger.kernel.org>
Cc: <j.neuschaefer@gmx.net>, <broonie@kernel.org>,
<yangyingliang@huawei.com>
Subject: [PATCH -next] spi: wpcm-fiu: switch to use devm_platform_ioremap_resource_byname()
Date: Thu, 3 Aug 2023 10:14:28 +0800 [thread overview]
Message-ID: <20230803021428.3739149-1-yangyingliang@huawei.com> (raw)
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/spi/spi-wpcm-fiu.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-wpcm-fiu.c b/drivers/spi/spi-wpcm-fiu.c
index 852ffe013d32..d07a06f49204 100644
--- a/drivers/spi/spi-wpcm-fiu.c
+++ b/drivers/spi/spi-wpcm-fiu.c
@@ -448,8 +448,7 @@ static int wpcm_fiu_probe(struct platform_device *pdev)
fiu = spi_controller_get_devdata(ctrl);
fiu->dev = dev;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "control");
- fiu->regs = devm_ioremap_resource(dev, res);
+ fiu->regs = devm_platform_ioremap_resource_byname(pdev, "control");
if (IS_ERR(fiu->regs)) {
dev_err(dev, "Failed to map registers\n");
return PTR_ERR(fiu->regs);
--
2.25.1
next reply other threads:[~2023-08-03 2:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 2:14 Yang Yingliang [this message]
2023-08-14 8:13 ` [PATCH -next] spi: wpcm-fiu: switch to use devm_platform_ioremap_resource_byname() Jonathan Neuschäfer
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=20230803021428.3739149-1-yangyingliang@huawei.com \
--to=yangyingliang@huawei.com \
--cc=broonie@kernel.org \
--cc=j.neuschaefer@gmx.net \
--cc=linux-spi@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.