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>
static void tegra_pmc_reset_suspend_mode(void *data)
{
+ struct tegra_pmc *pmc = data;
+
pmc->suspend_mode = TEGRA_SUSPEND_NOT_READY;
}
return err;
err = devm_add_action_or_reset(&pdev->dev, tegra_pmc_reset_suspend_mode,
- NULL);
+ pmc);
if (err)
return err;