summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-10-17 20:12:38 +0300
committerMark Brown <broonie@kernel.org>2022-10-18 19:16:51 +0100
commite3b7fca31185813297bb995d7b21a6305bb62c84 (patch)
tree158c8b755a69ac25897d7e29a003a0f0f495274b /drivers
parent4e12ef2b2e3f65c4fba895262363c499476848a1 (diff)
spi: pxa2xx: Simplify with devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. No functional changes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20221017171243.57078-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-pxa2xx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 2bf21c2e7a52..03ed6d4a14cd 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1482,8 +1482,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
ssp = &pdata->ssp;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res);
+ ssp->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(ssp->mmio_base))
return ERR_CAST(ssp->mmio_base);