From b2a3e8200056480219d4bc44c3403cacf0125495 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 3 Feb 2025 14:47:15 +0100 Subject: [PATCH] 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 --- drivers/soc/tegra/pmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index cd7c557c886b5..f215396206f10 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -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; -- 2.47.3