Skip to content

Commit 0e0d59f

Browse files
bbkzzmiquelraynal
authored andcommitted
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 <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 79c4a56 commit 0e0d59f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mtd/maps/plat-ram.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ static int platram_probe(struct platform_device *pdev)
123123
info->pdata = pdata;
124124

125125
/* get the resource for the memory mapping */
126-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
127-
info->map.virt = devm_ioremap_resource(&pdev->dev, res);
126+
info->map.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
128127
if (IS_ERR(info->map.virt)) {
129128
err = PTR_ERR(info->map.virt);
130129
goto exit_free;

0 commit comments

Comments
 (0)