linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource()
@ 2022-09-28 14:58 Yang Yingliang
  2022-09-28 14:58 ` [PATCH -next 2/2] spi: cadence-quadspi: Use devm_platform_{get_and_}ioremap_resource() Yang Yingliang
  2022-10-18 12:45 ` [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-09-28 14:58 UTC (permalink / raw)
  To: linux-spi; +Cc: broonie, p.zabel, 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-bcm63xx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 80fa0ef8909c..3686d78c44a6 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -547,8 +547,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, master);
 	bs->pdev = pdev;
 
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	bs->regs = devm_ioremap_resource(&pdev->dev, r);
+	bs->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
 	if (IS_ERR(bs->regs)) {
 		ret = PTR_ERR(bs->regs);
 		goto out_err;
-- 
2.25.1


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

* [PATCH -next 2/2] spi: cadence-quadspi: Use devm_platform_{get_and_}ioremap_resource()
  2022-09-28 14:58 [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
@ 2022-09-28 14:58 ` Yang Yingliang
  2022-10-18 12:45 ` [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Yang Yingliang @ 2022-09-28 14:58 UTC (permalink / raw)
  To: linux-spi; +Cc: broonie, p.zabel, 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-cadence-quadspi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 447230547945..4219113cf36b 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1580,7 +1580,6 @@ static int cqspi_probe(struct platform_device *pdev)
 	struct spi_master *master;
 	struct resource *res_ahb;
 	struct cqspi_st *cqspi;
-	struct resource *res;
 	int ret;
 	int irq;
 
@@ -1616,8 +1615,7 @@ static int cqspi_probe(struct platform_device *pdev)
 	}
 
 	/* Obtain and remap controller address. */
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	cqspi->iobase = devm_ioremap_resource(dev, res);
+	cqspi->iobase = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(cqspi->iobase)) {
 		dev_err(dev, "Cannot remap controller address.\n");
 		ret = PTR_ERR(cqspi->iobase);
@@ -1625,8 +1623,7 @@ static int cqspi_probe(struct platform_device *pdev)
 	}
 
 	/* Obtain and remap AHB address. */
-	res_ahb = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	cqspi->ahb_base = devm_ioremap_resource(dev, res_ahb);
+	cqspi->ahb_base = devm_platform_get_and_ioremap_resource(pdev, 1, &res_ahb);
 	if (IS_ERR(cqspi->ahb_base)) {
 		dev_err(dev, "Cannot remap AHB address.\n");
 		ret = PTR_ERR(cqspi->ahb_base);
-- 
2.25.1


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

* Re: [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource()
  2022-09-28 14:58 [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
  2022-09-28 14:58 ` [PATCH -next 2/2] spi: cadence-quadspi: Use devm_platform_{get_and_}ioremap_resource() Yang Yingliang
@ 2022-10-18 12:45 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-10-18 12:45 UTC (permalink / raw)
  To: Yang Yingliang, linux-spi; +Cc: p.zabel

On Wed, 28 Sep 2022 22:58:51 +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/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource()
      commit: a008ae9f8336d79df589eb343a38080a4b98340d
[2/2] spi: cadence-quadspi: Use devm_platform_{get_and_}ioremap_resource()
      commit: 4e12ef2b2e3f65c4fba895262363c499476848a1

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] 3+ messages in thread

end of thread, other threads:[~2022-10-18 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 14:58 [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
2022-09-28 14:58 ` [PATCH -next 2/2] spi: cadence-quadspi: Use devm_platform_{get_and_}ioremap_resource() Yang Yingliang
2022-10-18 12:45 ` [PATCH -next 1/2] spi: bcm63xx: Use devm_platform_get_and_ioremap_resource() 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).