From: Thierry Reding <treding@xxxxxxxxxx> Rather than relying on a global variable, make use of the fact that the syscore ops are embedded in the PMC context and can be obtained via container_of(). Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> --- drivers/soc/tegra/pmc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 6a3923e1c792..ea26c2651497 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -3143,6 +3143,7 @@ static void tegra186_pmc_process_wake_events(struct tegra_pmc *pmc, unsigned int static void tegra186_pmc_wake_syscore_resume(struct syscore_ops *ops) { + struct tegra_pmc *pmc = container_of(ops, struct tegra_pmc, syscore); u32 status, mask; unsigned int i; @@ -3156,6 +3157,8 @@ static void tegra186_pmc_wake_syscore_resume(struct syscore_ops *ops) static int tegra186_pmc_wake_syscore_suspend(struct syscore_ops *ops) { + struct tegra_pmc *pmc = container_of(ops, struct tegra_pmc, syscore); + wke_read_sw_wake_status(pmc); /* flip the wakeup trigger for dual-edge triggered pads -- 2.48.1