diff options
author | Yangtao Li <[email protected]> | 2023-07-07 12:06:12 +0800 |
---|---|---|
committer | Miquel Raynal <[email protected]> | 2023-07-12 14:07:54 +0200 |
commit | 892ad2638a6ba33c0b5afb335501b9bb7e8a83b6 (patch) | |
tree | a55bc9721705f541c72ff3c53a586722cc3836c1 | |
parent | 9cd9dda8f06c9100997e981f11e8ef9cec042a95 (diff) |
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 <[email protected]>
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
-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); |