Commit fcbbcc32 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-card: add snd_soc_card_remove_dai_link()

Card related function should be implemented at soc-card now.
This patch adds it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87mu5szv2h.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent cbc7a6b5
...@@ -37,6 +37,8 @@ int snd_soc_card_set_bias_level_post(struct snd_soc_card *card, ...@@ -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, int snd_soc_card_add_dai_link(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link); 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 */ /* device driver data */
static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card, static inline void snd_soc_card_set_drvdata(struct snd_soc_card *card,
......
...@@ -215,3 +215,11 @@ int snd_soc_card_add_dai_link(struct snd_soc_card *card, ...@@ -215,3 +215,11 @@ int snd_soc_card_add_dai_link(struct snd_soc_card *card,
return soc_card_ret(card, ret); return soc_card_ret(card, ret);
} }
EXPORT_SYMBOL_GPL(snd_soc_card_add_dai_link); 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);
...@@ -947,8 +947,7 @@ void snd_soc_remove_pcm_runtime(struct snd_soc_card *card, ...@@ -947,8 +947,7 @@ void snd_soc_remove_pcm_runtime(struct snd_soc_card *card,
/* /*
* Notify the machine driver for extra destruction * Notify the machine driver for extra destruction
*/ */
if (card->remove_dai_link) snd_soc_card_remove_dai_link(card, rtd->dai_link);
card->remove_dai_link(card, rtd->dai_link);
soc_free_pcm_runtime(rtd); soc_free_pcm_runtime(rtd);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment