soc/tegra: pmc: Pass PMC context as debugfs data

Each debugfs file can have private data associated with it. Use this to
pass the PMC context instead of relying on a global variable.

Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Thierry Reding 2025-02-03 14:47:15 +01:00
parent a9f822b3ff
commit b2a3e82000

View File

@ -1178,6 +1178,7 @@ static int tegra_pmc_power_off_handler(struct sys_off_data *data)
static int powergate_show(struct seq_file *s, void *data)
{
struct tegra_pmc *pmc = data;
unsigned int i;
int status;
@ -3097,7 +3098,7 @@ 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, NULL, &powergate_fops);
debugfs_create_file("powergate", 0444, NULL, pmc, &powergate_fops);
return 0;