]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite9489c64d5de2a0c2fc38b49e43cccc5aac52d85
tree64a7072d4bac8d4d25b022aa9c76dd70a20e0017
parentaf45c2c4c1be1fc4991edb95e749598179d8b846
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