summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-card.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-05-28 10:49:26 +0900
committerMark Brown <broonie@kernel.org>2020-05-30 02:11:38 +0100
commitb0275d956fab05a5088e20244c8d1eb433b7b90f (patch)
tree6fe5f3929053bb470b683011fd3a5861d1d2cb0a /sound/soc/soc-card.c
parent5c0eac036dfd3e20dd09ab86343c3b2fb2a1ac86 (diff)
downloadlinux-b0275d956fab05a5088e20244c8d1eb433b7b90f.tar.bz2
ASoC: soc-card: add snd_soc_card_remove()
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/87tv00zv4p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-card.c')
-rw-r--r--sound/soc/soc-card.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/soc-card.c b/sound/soc/soc-card.c
index 317771d87e3f..920967a9a5ea 100644
--- a/sound/soc/soc-card.c
+++ b/sound/soc/soc-card.c
@@ -166,3 +166,16 @@ int snd_soc_card_late_probe(struct snd_soc_card *card)
return 0;
}
+
+int snd_soc_card_remove(struct snd_soc_card *card)
+{
+ int ret = 0;
+
+ if (card->probed &&
+ card->remove)
+ ret = card->remove(card);
+
+ card->probed = 0;
+
+ return soc_card_ret(card, ret);
+}