projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c4a56
)
mtd: plat-ram: Use devm_platform_get_and_ioremap_resource()
author
Yangtao Li
<frank.li@vivo.com>
Fri, 7 Jul 2023 04:06:17 +0000
(12:06 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Wed, 12 Jul 2023 12:08:22 +0000
(14:08 +0200)
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
drivers/mtd/maps/plat-ram.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/maps/plat-ram.c
b/drivers/mtd/maps/plat-ram.c
index
cedd8ef
..
4c921dc
100644
(file)
--- 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;