]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-pcm: add snd_soc_dpcm_can_be() and remove duplicate code
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 17 Feb 2020 08:28:07 +0000 (17:28 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 18 Feb 2020 23:37:03 +0000 (23:37 +0000)
commit9237ef8a67915e409b1f3287e474b2d75b8e0cc1
treecc8cc34f3b35cf938b909cf124c0d4754ce97495
parent3139929f792141318022d44c33b4648c807196fa
ASoC: soc-pcm: add snd_soc_dpcm_can_be() and remove duplicate code

Below functions are doing very similar things, the difference is
used state only.

snd_soc_dpcm_can_be_free_stop()
snd_soc_dpcm_can_be_params()

This patch adds common snd_soc_dpcm_check_state(), and use it from
snd_soc_dpcm_can_be_free_stop() / snd_soc_dpcm_can_be_params().
It can reduce duplicate code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/878sl1bou2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c