diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-06 05:27:24 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-07-09 23:51:40 +0200 |
commit | b778d967979d7ed638fe1de8c2465ff33ace47d8 (patch) | |
tree | c9ab4ada0ffc273d04af8e1cefda762438090c1e /drivers/spi/spi-rspi.c | |
parent | spi: spi-nxp-fspi: Convert to devm_platform_ioremap_resource() and devm_platf... (diff) | |
download | linux-b778d967979d7ed638fe1de8c2465ff33ace47d8.tar.xz linux-b778d967979d7ed638fe1de8c2465ff33ace47d8.zip |
spi: rspi: Use 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.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230706032727.9180-5-frank.li@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-rspi.c')
-rw-r--r-- | drivers/spi/spi-rspi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 08ceebbaf69b..9312a9d58a1b 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c @@ -1317,8 +1317,7 @@ static int rspi_probe(struct platform_device *pdev) rspi->ops = ops; rspi->ctlr = ctlr; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rspi->addr = devm_ioremap_resource(&pdev->dev, res); + rspi->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(rspi->addr)) { ret = PTR_ERR(rspi->addr); goto error1; |