ASoC: pcm3168a: refactor hw_params routine
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Tue, 8 Feb 2022 08:42:18 +0000 (11:42 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 14 Feb 2022 12:52:53 +0000 (12:52 +0000)
commitc7270209fc6fc377ba5813e8d5b2ce2b26352ee7
tree64a7072d4bac8d4d25b022aa9c76dd70a20e0017
parent0c483a07e92638aca1f7d42a4986e32c58d29ad2
ASoC: pcm3168a: refactor hw_params routine

- group together code lines that calculate value for msad/msda field

- rename variables to better match their meaning:
    val -> ms,
    max_ratio -> num_scki_ratios

- update variable types to match exactly parameters or return types
  of the calls where those variables are used

- write two fields of the same register in a single regmap call

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-3-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/pcm3168a.c