diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-07 06:06:12 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-07-12 14:07:54 +0200 |
commit | 892ad2638a6ba33c0b5afb335501b9bb7e8a83b6 (patch) | |
tree | a55bc9721705f541c72ff3c53a586722cc3836c1 | |
parent | mtd: rawnand: lpc32xx_mlc: Use devm_platform_get_and_ioremap_resource() (diff) | |
download | linux-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.c | 3 |
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); |