From: Petlozu Pravareshwar Date: Tue, 6 Sep 2022 13:51:17 +0000 (+0000) Subject: soc/tegra: pmc: Check device node status property X-Git-Tag: v6.1-rc1~155^2~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74f7f183d81c26a53c2b1708364069d391b1b4d6;p=thirdparty%2Flinux.git soc/tegra: pmc: Check device node status property In early_initcall, check if PMC device is available for use and avoid accessing PMC resources if the device node status property is set to disabled. Signed-off-by: Manish Bhardwaj Signed-off-by: Petlozu Pravareshwar Signed-off-by: Thierry Reding --- diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 961b2de163078..678e8bc8a45d1 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -4044,7 +4044,7 @@ static int __init tegra_pmc_early_init(void) return -ENXIO; } - if (np) { + if (of_device_is_available(np)) { pmc->soc = match->data; if (pmc->soc->maybe_tz_only)