Thread (1 message) read the whole thread 1 message, 1 author, 2011-02-07

Re: [RFC,PATCH 1/3] Add a common struct clk

From: Jeremy Kerr <hidden>
Date: 2011-02-07 08:23:15
Also in: linux-arm-kernel, lkml

Hi Dima,
quoted
+int clk_prepare(struct clk *clk)
+{
+       int ret = 0;
+
+       if (!clk->ops->prepare)
+               return 0;
+
+       mutex_lock(&clk->prepare_lock);
+       if (clk->prepare_count = 0)
+               ret = clk->ops->prepare(clk);
+
+       if (!ret)
+               clk->prepare_count++;
+       mutex_unlock(&clk->prepare_lock);
+
+       return 0;
return ret;
Good catch, thanks.


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