summaryrefslogtreecommitdiff
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-07 07:06:17 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-07-12 15:08:22 +0300
commit0e0d59f2f6ba8f26a16081fb76d301fc369cea36 (patch)
treea5a86a31de199d3f99c9a25feb83d1d858e9a11b /drivers/mtd/maps
parent79c4a56250216991f1d965ee26dcd273376e4e91 (diff)
downloadlinux-0e0d59f2f6ba8f26a16081fb76d301fc369cea36.tar.xz
mtd: plat-ram: 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-13-frank.li@vivo.com
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/plat-ram.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
index cedd8ef9a6bf..4c921dce7396 100644
--- a/drivers/mtd/maps/plat-ram.c
+++ b/drivers/mtd/maps/plat-ram.c
@@ -123,8 +123,7 @@ static int platram_probe(struct platform_device *pdev)
info->pdata = pdata;
/* get the resource for the memory mapping */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- info->map.virt = devm_ioremap_resource(&pdev->dev, res);
+ info->map.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(info->map.virt)) {
err = PTR_ERR(info->map.virt);
goto exit_free;