clk: Don't set clk->new_rate twice
authorViresh Kumar <viresh.kumar@st.com>
Tue, 17 Apr 2012 11:15:38 +0000 (16:45 +0530)
committerMike Turquette <mturquette@linaro.org>
Tue, 24 Apr 2012 23:37:41 +0000 (16:37 -0700)
if (!clk->ops->round_rate && (clk->flags & CLK_SET_RATE_PARENT)) is true, then
we don't need to set clk->new_rate here, as we will call clk_calc_subtree()
afterwards and it also sets clk->new_rate.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk.c

index c6e8866289b4ab71329e8e17750bf7258e35f409..2dd20c01134d4e9e96634fe371b00969641df799 100644 (file)
@@ -790,7 +790,7 @@ static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long rate)
 
        if (!clk->ops->round_rate) {
                top = clk_calc_new_rates(clk->parent, rate);
-               new_rate = clk->new_rate = clk->parent->new_rate;
+               new_rate = clk->parent->new_rate;
 
                goto out;
        }