[PATCH 4/5] watchdog: dw_wdt: unqueue timer on device removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The watchdog device's timer may be queued when the platform driver
"remove" function is called.  Call `del_timer_sync` to remove it from
the queue.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/watchdog/dw_wdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 1cd877b..daab90b 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -387,6 +387,8 @@ out_unmark_probed:
 
 static int dw_wdt_drv_remove(struct platform_device *pdev)
 {
+	del_timer_sync(&dw_wdt.timer);
+
 	if (test_and_clear_bit(DW_WDT_RESTART_HANDLER, &dw_wdt.state))
 		unregister_restart_handler(&dw_wdt.restart_handler);
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux