Skip to contentSkip to conversation

soc/tegra: pmc: Simplify resource lookup

PATCH Applied Jon Hunter 2 participants 2 messages Jun 11, 2024 – Jun 27, 2024 Tegra architecture support

lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH v2 1/1 soc/tegra: pmc: Simplify resource lookup

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().

---
Changes since V1:
- Update commit subject and commit message.

 drivers/soc/tegra/pmc.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/soc/tegra/pmc.c +2 -6
index 91d0ad6ddefc..6c37d6eb8b49 100644
@@ -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);
 
Signature · 1 line
2.34.1
#1 lore raw

From: Thierry Reding <[email protected]>

Quoted 8 lines · Jon Hunter

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().

[...]

Applied, thanks!

[1/1] soc/tegra: pmc: Simplify resource lookup

      commit: cfcd6c46fec46cac3bf6658838d3ea329aff37aa

Best regards,

Signature · 1 line
Thierry Reding <[email protected]>