Skip to content

Commit cfcd6c4

Browse files
jonhunterthierryreding
authored andcommitted
soc/tegra: pmc: Simplify resource lookup
Commit 6f4429e ("soc/tegra: pmc: Update address mapping sequence for PMC apertures") updated the resource lookup code in the PMC driver. Instead of calling platform_get_resource_byname() and devm_ioremap_resource() simplify the code by simply calling devm_platform_ioremap_resource_byname(). Signed-off-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 1613e60 commit cfcd6c4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/soc/tegra/pmc.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,15 +2891,11 @@ static int tegra_pmc_probe(struct platform_device *pdev)
28912891
pmc->aotag = base;
28922892
pmc->scratch = base;
28932893
} else {
2894-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
2895-
"wake");
2896-
pmc->wake = devm_ioremap_resource(&pdev->dev, res);
2894+
pmc->wake = devm_platform_ioremap_resource_byname(pdev, "wake");
28972895
if (IS_ERR(pmc->wake))
28982896
return PTR_ERR(pmc->wake);
28992897

2900-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
2901-
"aotag");
2902-
pmc->aotag = devm_ioremap_resource(&pdev->dev, res);
2898+
pmc->aotag = devm_platform_ioremap_resource_byname(pdev, "aotag");
29032899
if (IS_ERR(pmc->aotag))
29042900
return PTR_ERR(pmc->aotag);
29052901

0 commit comments

Comments
 (0)