mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
soc/tegra: pmc: Use contextual data instead of global variable
Pass the driver-specific data via the syscore struct and use it in the syscore ops. Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
e6d96073af
commit
f59dbd0c93
|
|
@ -3192,6 +3192,7 @@ static void wke_clear_wake_status(struct tegra_pmc *pmc)
|
|||
|
||||
static void tegra186_pmc_wake_syscore_resume(void *data)
|
||||
{
|
||||
struct tegra_pmc *pmc = data;
|
||||
unsigned int i;
|
||||
u32 mask;
|
||||
|
||||
|
|
@ -3206,6 +3207,7 @@ static void tegra186_pmc_wake_syscore_resume(void *data)
|
|||
|
||||
static int tegra186_pmc_wake_syscore_suspend(void *data)
|
||||
{
|
||||
struct tegra_pmc *pmc = data;
|
||||
unsigned int i;
|
||||
|
||||
/* Check if there are unhandled wake IRQs */
|
||||
|
|
@ -3214,6 +3216,7 @@ static int tegra186_pmc_wake_syscore_suspend(void *data)
|
|||
dev_warn(pmc->dev,
|
||||
"Unhandled wake IRQs pending vector[%u]: 0x%x\n",
|
||||
i, pmc->wake_status[i]);
|
||||
|
||||
wke_read_sw_wake_status(pmc);
|
||||
|
||||
/* flip the wakeup trigger for dual-edge triggered pads
|
||||
|
|
@ -3887,6 +3890,7 @@ static const struct tegra_pmc_regs tegra186_pmc_regs = {
|
|||
static void tegra186_pmc_init(struct tegra_pmc *pmc)
|
||||
{
|
||||
pmc->syscore.ops = &tegra186_pmc_wake_syscore_ops;
|
||||
pmc->syscore.data = pmc;
|
||||
register_syscore(&pmc->syscore);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user