From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-spi@vger.kernel.org, j.neuschaefer@gmx.net, broonie@kernel.org
Subject: Re: [PATCH -next] spi: wpcm-fiu: switch to use devm_platform_ioremap_resource_byname()
Date: Mon, 14 Aug 2023 10:13:23 +0200 [thread overview]
Message-ID: <ZNniI8wVBQakNc0K@probook> (raw)
In-Reply-To: <20230803021428.3739149-1-yangyingliang@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1251 bytes --]
Hello,
thanks for your patch!
On Thu, Aug 03, 2023 at 10:14:28AM +0800, Yang Yingliang wrote:
> 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");
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Unfortunately, the other platform_get_resource_byname/devm_ioremap_resource
pair a few lines below can't easily be converted to
devm_platform_ioremap_resource_byname, because resource_size is needed.
Best regards,
Jonathan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-08-14 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 2:14 [PATCH -next] spi: wpcm-fiu: switch to use devm_platform_ioremap_resource_byname() Yang Yingliang
2023-08-14 8:13 ` Jonathan Neuschäfer [this message]
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=ZNniI8wVBQakNc0K@probook \
--to=j.neuschaefer@gmx.net \
--cc=broonie@kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=yangyingliang@huawei.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).