ASoC: fsl_sai: use DIV_ROUND_CLOSEST() to calculate divider
In fsl_sai_set_bclk() we want to calculate the divider that gets us closest to the desired frequency, so use DIV_ROUND_CLOSEST() instead of just doing a clk_rate/freq. Also discard invalid ratios earlier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20220302083428.3804687-7-s.hauer@pengutronix.deSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment