From: Peter De Schrijver Date: Wed, 5 Jun 2013 15:06:36 +0000 (+0300) Subject: clk: honor CLK_GET_RATE_NOCACHE in clk_set_rate X-Git-Tag: firefly_0821_release~6413 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=70ac521b4d375aca21af83772b8e68c4abf0722b;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index df249b3ca370..7ec4225971fe 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) {