Commit cfcd6c46 authored by Jon Hunter's avatar Jon Hunter Committed by Thierry Reding
Browse files

soc/tegra: pmc: Simplify resource lookup



Commit 6f4429e2 ("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: default avatarJon Hunter <jonathanh@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 1613e604
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -2891,15 +2891,11 @@ static int tegra_pmc_probe(struct platform_device *pdev)
		pmc->aotag = base;
		pmc->scratch = base;
	} else {
		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"wake");
		pmc->wake = devm_ioremap_resource(&pdev->dev, res);
		pmc->wake = devm_platform_ioremap_resource_byname(pdev, "wake");
		if (IS_ERR(pmc->wake))
			return PTR_ERR(pmc->wake);

		res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
						"aotag");
		pmc->aotag = devm_ioremap_resource(&pdev->dev, res);
		pmc->aotag = devm_platform_ioremap_resource_byname(pdev, "aotag");
		if (IS_ERR(pmc->aotag))
			return PTR_ERR(pmc->aotag);