]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fsl_sai: simplify register poking in fsl_sai_set_bclk
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Wed, 2 Mar 2022 08:34:24 +0000 (09:34 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 7 Mar 2022 13:13:05 +0000 (13:13 +0000)
commit75a71c1d2d04d6afcba8e915579e7e3149af58fa
treecba69282117bfcb3d0373ba255a98cda3dc3c587
parent3acfc33543744ea533b4c456057ae066356cb208
ASoC: fsl_sai: simplify register poking in fsl_sai_set_bclk

Depending on SAI synchronization mode, the same value is either
written to FSL_SAI_TCR2 or FSL_SAI_RCR2 or nothing is written at all.

As the computation is the same either way, factor it out to make it
clearer what the difference is. No functional change.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220302083428.3804687-4-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_sai.c