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.