linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
@ 2022-09-24 13:18 Yang Yingliang
  2022-09-24 13:18 ` [PATCH -next 2/3] spi: spi-fsl-lpspi: " Yang Yingliang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-24 13:18 UTC (permalink / raw)
  To: linux-spi; +Cc: olteanv, han.xu, broonie, yangyingliang

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next 2/3] spi: spi-fsl-lpspi: Use devm_platform_get_and_ioremap_resource()
  2022-09-24 13:18 [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
@ 2022-09-24 13:18 ` Yang Yingliang
  2022-09-24 13:18 ` [PATCH -next 3/3] spi: spi-fsl-qspi: Use devm_platform_ioremap_resource_byname() Yang Yingliang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-24 13:18 UTC (permalink / raw)
  To: linux-spi; +Cc: olteanv, han.xu, broonie, yangyingliang

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-lpspi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 13147377b2d6..e8c1c8a4c6c8 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -855,8 +855,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 
 	init_completion(&fsl_lpspi->xfer_done);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	fsl_lpspi->base = devm_ioremap_resource(&pdev->dev, res);
+	fsl_lpspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(fsl_lpspi->base)) {
 		ret = PTR_ERR(fsl_lpspi->base);
 		goto out_controller_put;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH -next 3/3] spi: spi-fsl-qspi: Use devm_platform_ioremap_resource_byname()
  2022-09-24 13:18 [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
  2022-09-24 13:18 ` [PATCH -next 2/3] spi: spi-fsl-lpspi: " Yang Yingliang
@ 2022-09-24 13:18 ` 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
  3 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2022-09-24 13:18 UTC (permalink / raw)
  To: linux-spi; +Cc: olteanv, han.xu, broonie, yangyingliang

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-fsl-qspi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
index 46ae46a944c5..85cc71ba624a 100644
--- a/drivers/spi/spi-fsl-qspi.c
+++ b/drivers/spi/spi-fsl-qspi.c
@@ -867,8 +867,7 @@ static int fsl_qspi_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, q);
 
 	/* find the resources */
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "QuadSPI");
-	q->iobase = devm_ioremap_resource(dev, res);
+	q->iobase = devm_platform_ioremap_resource_byname(pdev, "QuadSPI");
 	if (IS_ERR(q->iobase)) {
 		ret = PTR_ERR(q->iobase);
 		goto err_put_ctrl;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
  2022-09-24 13:18 [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
  2022-09-24 13:18 ` [PATCH -next 2/3] spi: spi-fsl-lpspi: " 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 ` Vladimir Oltean
  2022-09-27 10:34 ` Mark Brown
  3 siblings, 0 replies; 5+ messages in thread
From: Vladimir Oltean @ 2022-09-26 17:57 UTC (permalink / raw)
  To: Yang Yingliang; +Cc: linux-spi, han.xu, broonie

On Sat, Sep 24, 2022 at 09:18:52PM +0800, Yang Yingliang wrote:
> 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>
> ---

For the series:

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
  2022-09-24 13:18 [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
                   ` (2 preceding siblings ...)
  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
  3 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2022-09-27 10:34 UTC (permalink / raw)
  To: Yang Yingliang, linux-spi; +Cc: han.xu, olteanv

On Sat, 24 Sep 2022 21:18:52 +0800, Yang Yingliang wrote:
> Use the devm_platform_get_and_ioremap_resource() helper instead of calling
> platform_get_resource() and devm_ioremap_resource() separately.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
      commit: f96087a38cca6f3bb4c7cf582b949016aeb59d0e
[2/3] spi: spi-fsl-lpspi: Use devm_platform_get_and_ioremap_resource()
      commit: c9e1bb724d884b12a4c0d1dc9f802946cf427a92
[3/3] spi: spi-fsl-qspi: Use devm_platform_ioremap_resource_byname()
      commit: fc13b5a25e18b0de5e04b6f5616c60d71d2610ee

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-27 10:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24 13:18 [PATCH -next 1/3] spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
2022-09-24 13:18 ` [PATCH -next 2/3] spi: spi-fsl-lpspi: " 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

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).