All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bough Chen <haibo.chen@nxp.com>
To: Yangtao Li <frank.li@vivo.com>, Han Xu <han.xu@nxp.com>,
	Yogesh Gaur <yogeshgaur.83@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: "linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 4/7] spi: spi-nxp-fspi: Convert to devm_platform_ioremap_resource() and devm_platform_ioremap_resource_byname()
Date: Thu, 6 Jul 2023 06:06:31 +0000	[thread overview]
Message-ID: <DB7PR04MB4010A8EB832C46B31C2D9C99902CA@DB7PR04MB4010.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20230706032727.9180-4-frank.li@vivo.com>

> -----Original Message-----
> From: Yangtao Li <frank.li@vivo.com>
> Sent: 2023年7月6日 11:27
> To: Han Xu <han.xu@nxp.com>; Bough Chen <haibo.chen@nxp.com>; Yogesh
> Gaur <yogeshgaur.83@gmail.com>; Mark Brown <broonie@kernel.org>
> Cc: Yangtao Li <frank.li@vivo.com>; linux-spi@vger.kernel.org;
> linux-kernel@vger.kernel.org
> Subject: [PATCH 4/7] spi: spi-nxp-fspi: Convert to
> devm_platform_ioremap_resource() and
> devm_platform_ioremap_resource_byname()
> 
> Use devm_platform_ioremap_resource() and
> devm_platform_ioremap_resource_byname() to simplify code.

Thanks!

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>

Best Regards
Haibo Chen

> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  drivers/spi/spi-nxp-fspi.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index
> 544017655787..4cf9b3bf7b57 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -1157,12 +1157,10 @@ static int nxp_fspi_probe(struct platform_device
> *pdev)
> 
>  	/* find the resources - configuration register address space */
>  	if (is_acpi_node(dev_fwnode(f->dev)))
> -		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +		f->iobase = devm_platform_ioremap_resource(pdev, 0);
>  	else
> -		res = platform_get_resource_byname(pdev,
> -				IORESOURCE_MEM, "fspi_base");
> +		f->iobase = devm_platform_ioremap_resource_byname(pdev,
> "fspi_base");
> 
> -	f->iobase = devm_ioremap_resource(dev, res);
>  	if (IS_ERR(f->iobase)) {
>  		ret = PTR_ERR(f->iobase);
>  		goto err_put_ctrl;
> --
> 2.39.0


  reply	other threads:[~2023-07-06  6:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  3:27 [PATCH 1/7] spi: atmel: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-06  3:27 ` Yangtao Li
2023-07-06  3:27 ` [PATCH 2/7] spi: davinci: " Yangtao Li
2023-07-06  3:27 ` [PATCH 3/7] spi: ep93xx: " Yangtao Li
2023-07-06  3:27 ` [PATCH 4/7] spi: spi-nxp-fspi: Convert to devm_platform_ioremap_resource() and devm_platform_ioremap_resource_byname() Yangtao Li
2023-07-06  6:06   ` Bough Chen [this message]
2023-07-06  3:27 ` [PATCH 5/7] spi: rspi: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-06  3:27 ` [PATCH 6/7] spi: tegra20-slink: " Yangtao Li
2023-07-07 13:01   ` Thierry Reding
2023-07-06  3:27 ` [PATCH 7/7] spi: s3c64xx: " Yangtao Li
2023-07-06  3:27   ` Yangtao Li
2023-07-11 22:04 ` [PATCH 1/7] spi: atmel: " Mark Brown
2023-07-11 22:04   ` 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=DB7PR04MB4010A8EB832C46B31C2D9C99902CA@DB7PR04MB4010.eurprd04.prod.outlook.com \
    --to=haibo.chen@nxp.com \
    --cc=broonie@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=han.xu@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=yogeshgaur.83@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 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.