Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146715
b: refs/heads/master
c: b3cacf3
h: refs/heads/master
i:
  146713: 089e567
  146711: 89c257b
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed May 8, 2009
1 parent a54151e commit d8b0293
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5dafc91fca9135a7b0acb76d9709f4abfad92d6e
refs/heads/master: b3cacf318172757783d8272fc333284dd4f50140
9 changes: 6 additions & 3 deletions trunk/arch/sh/kernel/cpu/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,18 @@ static int __clk_enable(struct clk *clk)
* changes and the clock needs to hunt for the proper set of
* divisors to use before it can effectively recalc.
*/

if (clk->flags & CLK_ALWAYS_ENABLED) {
kref_get(&clk->kref);
return 0;
}

if (unlikely(atomic_read(&clk->kref.refcount) == 1))
if (clk->ops && clk->ops->init)
clk->ops->init(clk);

kref_get(&clk->kref);

if (clk->flags & CLK_ALWAYS_ENABLED)
return 0;

if (likely(clk->ops && clk->ops->enable))
clk->ops->enable(clk);

Expand Down

0 comments on commit d8b0293

Please sign in to comment.