summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/tegra/pmc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 034a2a535a1e..d8c8894a8f38 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -2897,9 +2897,16 @@ static int tegra_pmc_probe(struct platform_device *pdev)
if (IS_ERR(pmc->wake))
return PTR_ERR(pmc->wake);
- pmc->aotag = devm_platform_ioremap_resource_byname(pdev, "aotag");
- if (IS_ERR(pmc->aotag))
- return PTR_ERR(pmc->aotag);
+ /* "aotag" is an optional aperture */
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
+ "aotag");
+ if (res) {
+ pmc->aotag = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(pmc->aotag))
+ return PTR_ERR(pmc->aotag);
+ } else {
+ pmc->aotag = NULL;
+ }
/* "scratch" is an optional aperture */
res = platform_get_resource_byname(pdev, IORESOURCE_MEM,