[STLinux Kernel] [PATCH 4/4] watchdog: st_wdt: Add new driver for ST's LPC Watchdog
Peter Griffin
peter.griffin at linaro.org
Fri Sep 5 11:25:31 PDT 2014
Hi,
> > +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.
>
> > + 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.
More information about the linux-arm-kernel
mailing list