Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308215
b: refs/heads/master
c: 63f5c3b
h: refs/heads/master
i:
  308213: eca52c0
  308211: 876caf0
  308207: 66ce265
v: v3
  • Loading branch information
Mike Turquette committed May 8, 2012
1 parent dc3e64e commit aa10a02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 7704addb60e274d4e98c69a02f7ebe3f77c6c3a4
refs/heads/master: 63f5c3b2b18dcaca0fc8983b52a3f5d4d70a0590
7 changes: 6 additions & 1 deletion trunk/drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,12 +774,18 @@ static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long rate)
if (IS_ERR_OR_NULL(clk))
return NULL;

/* save parent rate, if it exists */
if (clk->parent)
best_parent_rate = clk->parent->rate;

/* never propagate up to the parent */
if (!(clk->flags & CLK_SET_RATE_PARENT)) {
if (!clk->ops->round_rate) {
clk->new_rate = clk->rate;
return NULL;
}
new_rate = clk->ops->round_rate(clk->hw, rate, &best_parent_rate);
goto out;
}

/* need clk->parent from here on out */
Expand All @@ -795,7 +801,6 @@ static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long rate)
goto out;
}

best_parent_rate = clk->parent->rate;
new_rate = clk->ops->round_rate(clk->hw, rate, &best_parent_rate);

if (best_parent_rate != clk->parent->rate) {
Expand Down

0 comments on commit aa10a02

Please sign in to comment.