linux-mips
[Top] [All Lists]

Re: [PATCH 05/10] MIPS: lantiq: add watchdog support

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH 05/10] MIPS: lantiq: add watchdog support
From: Jamie Iles <jamie@jamieiles.com>
Date: Thu, 6 Jan 2011 11:15:30 +0000
Cc: Jamie Iles <jamie@jamieiles.com>, Ralf Baechle <ralf@linux-mips.org>, Ralph Hempel <ralph.hempel@lantiq.com>, Wim Van Sebroeck <wim@iguana.be>, linux-mips@linux-mips.org, linux-watchdog@vger.kernel.org
In-reply-to: <4D25908E.9070509@openwrt.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1294257379-417-1-git-send-email-blogic@openwrt.org> <1294257379-417-6-git-send-email-blogic@openwrt.org> <20110105234910.GD2112@gallagher> <4D25908E.9070509@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Jan 06, 2011 at 10:51:10AM +0100, John Crispin wrote:
> On 06/01/11 00:49, Jamie Iles wrote:
> > I think you need a clk_put() here too to balance the clk_get() in the 
> > probe method so you'll need to keep a reference to the clk.
> >
> >   
> 
> Hi Jamie,
> 
> i will fold your suggestions into the series.
> 
> the clk.c/h implementation on the lantiq target is very simple. it only
> allows to read the static rates of the 3 clocks. clk_put is implemented
> as follows
> 
> void
> clk_put(struct clk *clk)
> {
>     /* not used */
> }
> EXPORT_SYMBOL(clk_put);
> 
> so in theory you are right and we should call that function, however as
> it is only a stub and the driver is only used by the lantiq target i
> think it is save to leave out the clk_put(); call. we could however put
> a commet in the code to make this clear (same as with the clk_enable()
> not being needed as the clocks are always running)

Could that ever change for future devices that share the same watchdog 
block?  If so, then adding in that clk_put() and clk_enable() might be 
worth it as it doesn't cost much.

Jamie

<Prev in Thread] Current Thread [Next in Thread>