All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: pmc: Check device node status property
@ 2022-09-06 13:51 Petlozu Pravareshwar
  2022-09-15 12:11 ` Thierry Reding
  0 siblings, 1 reply; 2+ messages in thread
From: Petlozu Pravareshwar @ 2022-09-06 13:51 UTC (permalink / raw)
  To: jonathanh, thierry.reding, p.zabel, dmitry.osipenko, ulf.hansson,
	kkartik, cai.huoqing, spatra, linux-tegra, linux-kernel
  Cc: petlozup, Manish Bhardwaj

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 <mbhardwaj@nvidia.com>
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
---
 drivers/soc/tegra/pmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 6a86961477e8..8c7b46ac6ad6 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -4295,7 +4295,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)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] soc/tegra: pmc: Check device node status property
  2022-09-06 13:51 [PATCH] soc/tegra: pmc: Check device node status property Petlozu Pravareshwar
@ 2022-09-15 12:11 ` Thierry Reding
  0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2022-09-15 12:11 UTC (permalink / raw)
  To: Petlozu Pravareshwar
  Cc: jonathanh, p.zabel, dmitry.osipenko, ulf.hansson, kkartik,
	cai.huoqing, spatra, linux-tegra, linux-kernel, Manish Bhardwaj

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

On Tue, Sep 06, 2022 at 01:51:17PM +0000, Petlozu Pravareshwar wrote:
> 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 <mbhardwaj@nvidia.com>
> Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
> ---
>  drivers/soc/tegra/pmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-15 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 13:51 [PATCH] soc/tegra: pmc: Check device node status property Petlozu Pravareshwar
2022-09-15 12:11 ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.