linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: amd: Use devm_platform_ioremap_resource() in amd_spi_probe
@ 2020-11-21  3:43 Qing Zhang
  2020-11-23 21:46 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Qing Zhang @ 2020-11-21  3:43 UTC (permalink / raw)
  To: Sanjay R Mehta, Mark Brown; +Cc: linux-spi, linux-kernel

Simplify this function implementation by using a known wrapper function.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---
 drivers/spi/spi-amd.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c
index 7f62954..3cf7609 100644
--- a/drivers/spi/spi-amd.c
+++ b/drivers/spi/spi-amd.c
@@ -250,7 +250,6 @@ static int amd_spi_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct spi_master *master;
 	struct amd_spi *amd_spi;
-	struct resource *res;
 	int err = 0;
 
 	/* Allocate storage for spi_master and driver private data */
@@ -261,9 +260,7 @@ static int amd_spi_probe(struct platform_device *pdev)
 	}
 
 	amd_spi = spi_master_get_devdata(master);
-
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	amd_spi->io_remap_addr = devm_ioremap_resource(&pdev->dev, res);
+	amd_spi->io_remap_addr = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(amd_spi->io_remap_addr)) {
 		err = PTR_ERR(amd_spi->io_remap_addr);
 		dev_err(dev, "error %d ioremap of SPI registers failed\n", err);
-- 
2.1.0


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

* Re: [PATCH] spi: amd: Use devm_platform_ioremap_resource() in amd_spi_probe
  2020-11-21  3:43 [PATCH] spi: amd: Use devm_platform_ioremap_resource() in amd_spi_probe Qing Zhang
@ 2020-11-23 21:46 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-11-23 21:46 UTC (permalink / raw)
  To: Qing Zhang, Sanjay R Mehta; +Cc: linux-spi, linux-kernel

On Sat, 21 Nov 2020 11:43:51 +0800, Qing Zhang wrote:
> Simplify this function implementation by using a known wrapper function.

Applied to

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

Thanks!

[1/1] spi: amd: Use devm_platform_ioremap_resource() in amd_spi_probe
      commit: 2ed6e3bac15242c18bef5af12547a13b25b65ac8

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

end of thread, other threads:[~2020-11-23 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21  3:43 [PATCH] spi: amd: Use devm_platform_ioremap_resource() in amd_spi_probe Qing Zhang
2020-11-23 21:46 ` 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).