diff options
author | Frans Klaver <frans.klaver@xsens.com> | 2015-01-14 03:15:43 -0500 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-01-20 07:58:30 -0500 |
commit | 2f6ea8ad738e7a9be1a675a4404606723797cc16 (patch) | |
tree | 8d12000376a5d578915ff97b3edd23d7662a4604 /drivers/power/reset/ltc2952-poweroff.c | |
parent | 5689b786f77308e7aa10fd736e87b270ae42026e (diff) |
power: reset: ltc2952: disable timers in _remove
Disable the timers when ltc2952_poweroff is removed. We don't want to
risk calling functions on data that no longer exist.
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/reset/ltc2952-poweroff.c')
-rw-r--r-- | drivers/power/reset/ltc2952-poweroff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c index 8e04b3299f9a..240b294a0980 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c | |||
@@ -285,6 +285,8 @@ static int ltc2952_poweroff_remove(struct platform_device *pdev) | |||
285 | struct ltc2952_poweroff *data = platform_get_drvdata(pdev); | 285 | struct ltc2952_poweroff *data = platform_get_drvdata(pdev); |
286 | 286 | ||
287 | pm_power_off = NULL; | 287 | pm_power_off = NULL; |
288 | hrtimer_cancel(&data->timer_trigger); | ||
289 | hrtimer_cancel(&data->timer_wde); | ||
288 | atomic_notifier_chain_unregister(&panic_notifier_list, | 290 | atomic_notifier_chain_unregister(&panic_notifier_list, |
289 | &data->panic_notifier); | 291 | &data->panic_notifier); |
290 | return 0; | 292 | return 0; |