Commit 2f6ea8ad authored by Frans Klaver's avatar Frans Klaver Committed by Sebastian Reichel

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: default avatarFrans Klaver <frans.klaver@xsens.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 5689b786
...@@ -285,6 +285,8 @@ static int ltc2952_poweroff_remove(struct platform_device *pdev) ...@@ -285,6 +285,8 @@ static int ltc2952_poweroff_remove(struct platform_device *pdev)
struct ltc2952_poweroff *data = platform_get_drvdata(pdev); struct ltc2952_poweroff *data = platform_get_drvdata(pdev);
pm_power_off = NULL; pm_power_off = NULL;
hrtimer_cancel(&data->timer_trigger);
hrtimer_cancel(&data->timer_wde);
atomic_notifier_chain_unregister(&panic_notifier_list, atomic_notifier_chain_unregister(&panic_notifier_list,
&data->panic_notifier); &data->panic_notifier);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment