ASoC: soc-dai: add snd_soc_dai_shutdown()

Current ALSA SoC is directly using dai->driver->ops->xxx,
thus, it has deep nested bracket, and it makes code unreadable.
This patch adds new snd_soc_dai_shutdown() and use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9vuhn4b.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto
2019-07-22 10:33:39 +09:00
committed by Mark Brown
parent 5a52a04531
commit 330fcb5135
4 changed files with 17 additions and 17 deletions

View File

@@ -300,3 +300,10 @@ int snd_soc_dai_startup(struct snd_soc_dai *dai,
return ret;
}
void snd_soc_dai_shutdown(struct snd_soc_dai *dai,
struct snd_pcm_substream *substream)
{
if (dai->driver->ops->shutdown)
dai->driver->ops->shutdown(substream, dai);
}