summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-card.c13
-rw-r--r--sound/soc/soc-core.c4
2 files changed, 14 insertions, 3 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);
+}
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 42e8c11a0b26..136ff7237a80 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1747,9 +1747,7 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
soc_cleanup_card_debugfs(card);
/* remove the card */
- if (card->probed && card->remove)
- card->remove(card);
- card->probed = 0;
+ snd_soc_card_remove(card);
if (card->snd_card) {
snd_card_free(card->snd_card);