OSDN Git Service

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)
commit814c9fc46fb987bdb3af093e4818c86e62db4fa5
treecba69282117bfcb3d0373ba255a98cda3dc3c587
parentcb00b4c18f89aa8ffb847cd033467f0958c025a0
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