diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-10 13:42:30 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-22 14:19:22 +0200 |
commit | 0521050215d0daae5d84b212fbe9fc16462f58f6 (patch) | |
tree | 4f364d6ff684664822a83130ce8a044d3f9839bd | |
parent | Linus 5.3-rc1 (diff) | |
download | linux-0521050215d0daae5d84b212fbe9fc16462f58f6.tar.xz linux-0521050215d0daae5d84b212fbe9fc16462f58f6.zip |
spi: dw-mmio: Use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20190710114230.30047-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/spi/spi-dw-mmio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c index 18c06568805e..1c1cac92a9de 100644 --- a/drivers/spi/spi-dw-mmio.c +++ b/drivers/spi/spi-dw-mmio.c @@ -138,7 +138,6 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) struct dw_spi_mmio *dwsmmio); struct dw_spi_mmio *dwsmmio; struct dw_spi *dws; - struct resource *mem; int ret; int num_cs; @@ -150,8 +149,7 @@ static int dw_spi_mmio_probe(struct platform_device *pdev) dws = &dwsmmio->dws; /* Get basic io resource and map it */ - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dws->regs = devm_ioremap_resource(&pdev->dev, mem); + dws->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dws->regs)) { dev_err(&pdev->dev, "SPI region map failed\n"); return PTR_ERR(dws->regs); |