Skip to content

Commit b2a3e82

Browse files
committed
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>
1 parent a9f822b commit b2a3e82

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/soc/tegra/pmc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,7 @@ static int tegra_pmc_power_off_handler(struct sys_off_data *data)
11781178

11791179
static int powergate_show(struct seq_file *s, void *data)
11801180
{
1181+
struct tegra_pmc *pmc = data;
11811182
unsigned int i;
11821183
int status;
11831184

@@ -3097,7 +3098,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
30973098
if (pmc->soc->set_wake_filters)
30983099
pmc->soc->set_wake_filters(pmc);
30993100

3100-
debugfs_create_file("powergate", 0444, NULL, NULL, &powergate_fops);
3101+
debugfs_create_file("powergate", 0444, NULL, pmc, &powergate_fops);
31013102

31023103
return 0;
31033104

0 commit comments

Comments
 (0)