ASoC: soc-card: add snd_soc_card_remove_dai_link()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 28 May 2020 01:50:46 +0000 (10:50 +0900)
committerMark Brown <broonie@kernel.org>
Sat, 30 May 2020 01:11:42 +0000 (02:11 +0100)
Card related function should be implemented at soc-card now.
This patch adds 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/87mu5szv2h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-card.h
sound/soc/soc-card.c
sound/soc/soc-core.c

index f7e5c0ec5dc537a936ffb058c4130fb983cd6ccf..4f2cc4fb56b7fb422acb9c8f92ce2a6cc32bc0e8 100644 (file)
@@ -37,6 +37,8 @@ int snd_soc_card_set_bias_level_post(struct snd_soc_card *card,
 
 int snd_soc_card_add_dai_link(struct snd_soc_card *card,
                              struct snd_soc_dai_link *dai_link);
+void snd_soc_card_remove_dai_link(struct snd_soc_card *card,
+                                 struct snd_soc_dai_link *dai_link);
 
 /* device driver data */
 static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
index ba84a55fa80da08f81dd6424b45a9ac700c13c97..41c586b86dc3045dc6abea8ed22dc51b7e0a88b9 100644 (file)
@@ -215,3 +215,11 @@ int snd_soc_card_add_dai_link(struct snd_soc_card *card,
        return soc_card_ret(card, ret);
 }
 EXPORT_SYMBOL_GPL(snd_soc_card_add_dai_link);
+
+void snd_soc_card_remove_dai_link(struct snd_soc_card *card,
+                                 struct snd_soc_dai_link *dai_link)
+{
+       if (card->remove_dai_link)
+               card->remove_dai_link(card, dai_link);
+}
+EXPORT_SYMBOL_GPL(snd_soc_card_remove_dai_link);
index d238b47252a5692aedd5aaf1cfa46e7570f32fba..b07eca2c6cccbd56da13a3453f1dac9fb92ad1e9 100644 (file)
@@ -947,8 +947,7 @@ void snd_soc_remove_pcm_runtime(struct snd_soc_card *card,
        /*
         * Notify the machine driver for extra destruction
         */
-       if (card->remove_dai_link)
-               card->remove_dai_link(card, rtd->dai_link);
+       snd_soc_card_remove_dai_link(card, rtd->dai_link);
 
        soc_free_pcm_runtime(rtd);
 }