clk: divider: Optimize clk_divider_bestdiv loop
Currently, the for-loop used to try all the different dividers to find the one that best fit tries all the values from 1 to max_div, incrementing by one. In case of power-of-two, or table based divider, the loop isn't optimal. Instead of incrementing by one, this patch provides directly the next divider. Signed-off-by: NMaxime Coquelin <maxime.coquelin@st.com> Signed-off-by: NMike Turquette <mturquette@linaro.org>
Showing
想要评论请 注册 或 登录