Skip to content

Commit 571f235

Browse files
Yang Listorulf
authored andcommitted
mmc: meson-gx: 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: Yang Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent c5a66dd commit 571f235

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mmc/host/meson-gx-mmc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,7 @@ static int meson_mmc_probe(struct platform_device *pdev)
12031203
if (ret)
12041204
return dev_err_probe(&pdev->dev, ret, "device reset failed\n");
12051205

1206-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1207-
host->regs = devm_ioremap_resource(&pdev->dev, res);
1206+
host->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
12081207
if (IS_ERR(host->regs))
12091208
return PTR_ERR(host->regs);
12101209

0 commit comments

Comments
 (0)