soc/tegra: pmc: Populate powergate debugfs only when needed
Jon Hunter
maintainerPATCH 1/1 soc/tegra: pmc: Populate powergate debugfs only when needed
The 'powergate' debugfs node is used to show the state of the powergates but for some devices the 'num_powergates' is 0 and so it displays nothing. Therefore, only populate this debugfs entry for devices where num_powergates is greater than 0.
Signed-off-by Jon Hunter <[email protected]>
--- drivers/soc/tegra/pmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/tegra/pmc.c +2 -1
@@ -3284,7 +3284,8 @@ static int tegra_pmc_probe(struct platform_device *pdev)if (pmc->soc->set_wake_filters) pmc->soc->set_wake_filters (pmc); -debugfs_create_file ("powergate" ,0444 ,NULL , pmc, &powergate_fops); +if (pmc->soc->num_powergates) +debugfs_create_file ("powergate" ,0444 ,NULL , pmc, &powergate_fops);return 0 ;
Signature · 1 line
2.43.0
From: Thierry Reding <[email protected]>
Quoted 4 lines · Jon Hunter
The 'powergate' debugfs node is used to show the state of the powergates but for some devices the '
num_powergates' is 0 and so it displays nothing. Therefore, only populate this debugfs entry for devices wherenum_powergatesis greater than 0.
Applied, thanks!
[1/1] soc/tegra: pmc: Populate powergate debugfs only when needed
commit: e106029fc8749ff20bbe8c1c9bf6c4570ab8681d
Best regards,
Signature · 1 line
Thierry Reding <[email protected]>