Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146829
b: refs/heads/master
c: 100890c
h: refs/heads/master
i:
  146827: 6f99cc6
v: v3
  • Loading branch information
Paul Mundt committed May 13, 2009
1 parent d40c036 commit 321c0fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 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: d672fef02738582bdeae6e77176e141eeb9169bc
refs/heads/master: 100890c55e326a9acb4429593c5ad2012c194564
25 changes: 16 additions & 9 deletions trunk/arch/sh/kernel/cpu/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,27 @@ EXPORT_SYMBOL_GPL(clk_set_rate);
int clk_set_rate_ex(struct clk *clk, unsigned long rate, int algo_id)
{
int ret = -EOPNOTSUPP;
unsigned long flags;

if (likely(clk->ops && clk->ops->set_rate)) {
unsigned long flags;
spin_lock_irqsave(&clock_lock, flags);

spin_lock_irqsave(&clock_lock, flags);
if (likely(clk->ops && clk->ops->set_rate)) {
ret = clk->ops->set_rate(clk, rate, algo_id);
if (ret == 0) {
if (clk->ops->recalc)
clk->rate = clk->ops->recalc(clk);
propagate_rate(clk);
}
spin_unlock_irqrestore(&clock_lock, flags);
if (ret != 0)
goto out_unlock;
} else {
clk->rate = rate;
ret = 0;
}

if (clk->ops && clk->ops->recalc)
clk->rate = clk->ops->recalc(clk);

propagate_rate(clk);

out_unlock:
spin_unlock_irqrestore(&clock_lock, flags);

return ret;
}
EXPORT_SYMBOL_GPL(clk_set_rate_ex);
Expand Down

0 comments on commit 321c0fa

Please sign in to comment.