[PATCH 10/13] power: reset: ltc2952: disable timers in _remove
From: Frans Klaver
Date: Wed Oct 22 2014 - 10:32:15 EST
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@xxxxxxxxx>
---
drivers/power/reset/ltc2952-poweroff.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c
index 8ab1da6..2f3fd5b 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)
struct ltc2952_poweroff *data = platform_get_drvdata(pdev);
pm_power_off = NULL;
+ hrtimer_cancel(&data->timer_trigger);
+ hrtimer_cancel(&data->timer_wde);
atomic_notifier_chain_unregister(&panic_notifier_list,
&data->panic_notifier);
return 0;
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/