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>
static int powergate_show(struct seq_file *s, void *data)
{
+ struct tegra_pmc *pmc = data;
unsigned int i;
int status;
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;