Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: composite: pass mux_hw into determine_rate

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>

+1 -1
+1 -1
drivers/clk/clk-composite.c
··· 71 71 best_parent_p); 72 72 } else if (mux_hw && mux_ops && mux_ops->determine_rate) { 73 73 mux_hw->clk = hw->clk; 74 - return mux_ops->determine_rate(rate_hw, rate, best_parent_rate, 74 + return mux_ops->determine_rate(mux_hw, rate, best_parent_rate, 75 75 best_parent_p); 76 76 } else { 77 77 pr_err("clk: clk_composite_determine_rate function called, but no mux or rate callback set!\n");