summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-07 06:06:12 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-07-12 14:07:54 +0200
commit892ad2638a6ba33c0b5afb335501b9bb7e8a83b6 (patch)
treea55bc9721705f541c72ff3c53a586722cc3836c1
parentmtd: rawnand: lpc32xx_mlc: Use devm_platform_get_and_ioremap_resource() (diff)
downloadlinux-892ad2638a6ba33c0b5afb335501b9bb7e8a83b6.tar.xz
linux-892ad2638a6ba33c0b5afb335501b9bb7e8a83b6.zip
mtd: rawnand: fsl_upm: 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> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230707040622.78174-8-frank.li@vivo.com
-rw-r--r--drivers/mtd/nand/raw/fsl_upm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c
index 086426139173..f1810e2f2c07 100644
--- a/drivers/mtd/nand/raw/fsl_upm.c
+++ b/drivers/mtd/nand/raw/fsl_upm.c
@@ -172,8 +172,7 @@ static int fun_probe(struct platform_device *ofdev)
if (!fun)
return -ENOMEM;
- io_res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
- fun->io_base = devm_ioremap_resource(&ofdev->dev, io_res);
+ fun->io_base = devm_platform_get_and_ioremap_resource(ofdev, 0, &io_res);
if (IS_ERR(fun->io_base))
return PTR_ERR(fun->io_base);