Thread (15 messages) 15 messages, 4 authors, 2014-09-22

[STLinux Kernel] [PATCH 4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog

From: peter.griffin@linaro.org (Peter Griffin)
Date: 2014-09-05 18:25:38
Also in: linux-watchdog, lkml

Hi,
quoted
+static int st_wdog_remove(struct platform_device *pdev)
+{
+	struct st_wdog *st_wdog = watchdog_get_drvdata(&st_wdog_dev);
+
+	if (watchdog_active(&st_wdog_dev))
+		st_wdog_stop(&st_wdog_dev);
+
+	st_wdog_setup(st_wdog, WDT_DISABLE);
+
+	watchdog_unregister_device(&st_wdog_dev);
+
No clk_disable_unprepare ?

Maye it is not necessary, but then I wonder why you have it above.
I think your right it should have a clk_disable_unprepare. Otherwise you will end up leaking a clock
reference each time you insmod / rmmod the driver.
quoted
+	return 0;
+}
+
+#ifdef CONFIG_PM
+static int st_wdog_suspend(struct device *dev)
+{
+	if (watchdog_active(&st_wdog_dev))
+		st_wdog_stop(&st_wdog_dev);
+
Is any clock activity necessary here ? Just asking, I don't really have an idea.
I would also expect the clock to be managed in suspend / resume callbacks.

regards,

Peter.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help