summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorPeter De Schrijver <pdeschrijver@nvidia.com>2013-06-05 18:06:36 +0300
committerMike Turquette <mturquette@linaro.org>2013-06-11 18:04:08 -0700
commit34e452a152efd25d654b7bc809df429337115b03 (patch)
tree24e7acc9298b2c61e7edccbad7b327d16c704d4e /drivers/clk/clk.c
parent670decdd9544eddbc2ecf14789da4845f8afdab0 (diff)
downloadblackbird-op-linux-34e452a152efd25d654b7bc809df429337115b03.tar.gz
blackbird-op-linux-34e452a152efd25d654b7bc809df429337115b03.zip
clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate
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>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9b2f94197dbf..2e669a87fb15 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -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) {
OpenPOWER on IntegriCloud