diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-04-24 02:15:20 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-04-29 15:27:41 +0300 |
commit | 7eaa313bdec3f2326c9cdacec88fd484a36c423b (patch) | |
tree | 703ed76182c927bb7a52c053b7d5de3bdf625922 /sound/soc/soc-core.c | |
parent | 51801aeafdc9c1d55e5e71e58a1bbbd2583328fa (diff) | |
download | linux-7eaa313bdec3f2326c9cdacec88fd484a36c423b.tar.xz |
ASoC: soc-dai: add snd_soc_pcm_dai_remove()
We have 2 type of component functions
snd_soc_dai_xxx() is focusing to dai itself,
snd_soc_pcm_dai_xxx() is focusing to rtd related dai.
Now we can update snd_soc_dai_remove() to
snd_soc_pcm_dai_remove(). This patch do it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87r1wdssjc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8cafca4e1405..95d8189e45ab 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1256,35 +1256,15 @@ err_probe: return ret; } -static void soc_remove_dai(struct snd_soc_dai *dai, int order) -{ - int err; - - if (!dai || !dai->probed || !dai->driver || - dai->driver->remove_order != order) - return; - - err = snd_soc_dai_remove(dai); - if (err < 0) - dev_err(dai->dev, - "ASoC: failed to remove %s: %d\n", - dai->name, err); - - dai->probed = 0; -} - static void soc_remove_link_dais(struct snd_soc_card *card) { - int i; - struct snd_soc_dai *dai; struct snd_soc_pcm_runtime *rtd; int order; for_each_comp_order(order) { for_each_card_rtds(card, rtd) { - /* remove DAIs */ - for_each_rtd_dais(rtd, i, dai) - soc_remove_dai(dai, order); + /* remove all rtd connected DAIs in good order */ + snd_soc_pcm_dai_remove(rtd, order); } } } |