Skip to content

Commit

Permalink
clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate
Browse files Browse the repository at this point in the history
clk_set_rate() uses clk->rate directly. This causes problems if the clock
is marked as CLK_GET_RATE_NOCACHE. Hence call clk_get_rate() to get the
current rate.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
  • Loading branch information
Peter De Schrijver authored and Mike Turquette committed Jun 12, 2013
1 parent 670decd commit 34e452a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
clk_prepare_lock();

/* bail early if nothing to do */
if (rate == clk->rate)
if (rate == clk_get_rate(clk))
goto out;

if ((clk->flags & CLK_SET_RATE_GATE) && clk->prepare_count) {
Expand Down

0 comments on commit 34e452a

Please sign in to comment.