[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140905182531.GA2383@griffinp-ThinkPad-X1-Carbon-2nd>
Date: Fri, 5 Sep 2014 19:25:31 +0100
From: Peter Griffin <peter.griffin@...aro.org>
To: Guenter Roeck <linux@...ck-us.net>
Cc: Lee Jones <lee.jones@...aro.org>, linux-watchdog@...r.kernel.org,
linux-kernel@...r.kernel.org, wim@...ana.be,
linux-arm-kernel@...ts.infradead.org, kernel@...inux.com
Subject: Re: [STLinux Kernel] [PATCH 4/4] watchdog: st_wdt: Add new driver
for ST's LPC Watchdog
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists