clk: composite: pass mux_hw into determine_rate
authorMike Turquette <mturquette@linaro.org>
Tue, 14 Jan 2014 20:56:01 +0000 (12:56 -0800)
committerMike Turquette <mturquette@linaro.org>
Wed, 15 Jan 2014 15:48:03 +0000 (07:48 -0800)
The composite clock's .determine_rate implementation can call the
underyling .determine_rate callback corresponding to rate_hw or the
underlying .determine_rate callback corresponding to mux_hw. In both
cases we pass in rate_hw, which is wrong. Fixed by passing mux_hw into
the correct callback.

Reported-by: Lemon Dai <dailemon.gl@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk-composite.c

index 753d0b78476226310fde948e181e675188cbff45..57a078e06efe7cd376432d4ced0b9b41be539f1d 100644 (file)
@@ -71,7 +71,7 @@ static long clk_composite_determine_rate(struct clk_hw *hw, unsigned long rate,
                                                best_parent_p);
        } else if (mux_hw && mux_ops && mux_ops->determine_rate) {
                mux_hw->clk = hw->clk;
-               return mux_ops->determine_rate(rate_hw, rate, best_parent_rate,
+               return mux_ops->determine_rate(mux_hw, rate, best_parent_rate,
                                               best_parent_p);
        } else {
                pr_err("clk: clk_composite_determine_rate function called, but no mux or rate callback set!\n");