summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-06 11:27:24 +0800
committerMark Brown <broonie@kernel.org>2023-07-09 22:51:40 +0100
commitb778d967979d7ed638fe1de8c2465ff33ace47d8 (patch)
treec9ab4ada0ffc273d04af8e1cefda762438090c1e
parent8c8e947b6be037d0a311f11688212c7d87aa5440 (diff)
downloadlwn-b778d967979d7ed638fe1de8c2465ff33ace47d8.tar.gz
lwn-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>
-rw-r--r--drivers/spi/spi-rspi.c3
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;