[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250217163713.211949-8-thierry.reding@gmail.com>
Date: Mon, 17 Feb 2025 17:37:13 +0100
From: Thierry Reding <thierry.reding@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: x86@...nel.org,
linux-arm-kernel@...ts.infradead.org,
linux-riscv@...ts.infradead.org,
linux-mips@...r.kernel.org,
loongarch@...ts.linux.dev,
linuxppc-dev@...ts.ozlabs.org,
linux-sh@...r.kernel.org,
linux-pci@...r.kernel.org,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 7/7] soc/tegra: pmc: Derive PMC context from syscore ops
From: Thierry Reding <treding@...dia.com>
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@...dia.com>
---
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
Powered by blists - more mailing lists