summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2025-02-03 14:55:03 +0100
committerThierry Reding <treding@nvidia.com>2026-01-18 08:48:30 +0100
commite1fd5ad68acd3c3a76651c811e1fdb4846237370 (patch)
treeb87e95284e1be03a8296c7321d2706382d139def /drivers/soc
parent2e944c51d6617d3ded7734d21202036c126344a1 (diff)
soc/tegra: pmc: Do not rely on global variable
The reset action for changing the suspend mode back on failure can take a context-specific data argument that can be set to the PMC context in order to avoid relying on a global variable. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/tegra/pmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 9cfa7c3d5cae..750fe29f4cf5 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -2944,6 +2944,8 @@ static int tegra_pmc_regmap_init(struct tegra_pmc *pmc)
static void tegra_pmc_reset_suspend_mode(void *data)
{
+ struct tegra_pmc *pmc = data;
+
pmc->suspend_mode = TEGRA_SUSPEND_NOT_READY;
}
@@ -2966,7 +2968,7 @@ static int tegra_pmc_probe(struct platform_device *pdev)
return err;
err = devm_add_action_or_reset(&pdev->dev, tegra_pmc_reset_suspend_mode,
- NULL);
+ pmc);
if (err)
return err;