]> Git Repo - J-linux.git/commitdiff
soc/tegra: pmc: Simplify resource lookup
authorJon Hunter <[email protected]>
Tue, 11 Jun 2024 07:56:03 +0000 (08:56 +0100)
committerThierry Reding <[email protected]>
Thu, 27 Jun 2024 07:02:31 +0000 (09:02 +0200)
Commit 6f4429e21a7f ("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]>
drivers/soc/tegra/pmc.c

index 91d0ad6ddefc156da64e82a47eb120def1ad6cbd..6c37d6eb8b495ca9d2f72dd45e512fad8e71bdf8 100644 (file)
@@ -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);
 
This page took 0.063115 seconds and 4 git commands to generate.