aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc-dai.h1
-rw-r--r--sound/soc/soc-core.c13
-rw-r--r--sound/soc/soc-dai.c7
3 files changed, 14 insertions, 7 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index da8d8b889089..2a11f177ce01 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -165,6 +165,7 @@ snd_pcm_sframes_t snd_soc_dai_delay(struct snd_soc_dai *dai,
void snd_soc_dai_suspend(struct snd_soc_dai *dai);
void snd_soc_dai_resume(struct snd_soc_dai *dai);
int snd_soc_dai_probe(struct snd_soc_dai *dai);
+int snd_soc_dai_remove(struct snd_soc_dai *dai);
struct snd_soc_dai_ops {
/*
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3e73468225f9..727fd342b3fb 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -992,13 +992,12 @@ static void soc_remove_dai(struct snd_soc_dai *dai, int order)
dai->driver->remove_order != order)
return;
- if (dai->driver->remove) {
- err = dai->driver->remove(dai);
- if (err < 0)
- dev_err(dai->dev,
- "ASoC: failed to remove %s: %d\n",
- dai->name, err);
- }
+ 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;
}
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 55c1fac99613..384765c747da 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -372,3 +372,10 @@ int snd_soc_dai_probe(struct snd_soc_dai *dai)
return dai->driver->probe(dai);
return 0;
}
+
+int snd_soc_dai_remove(struct snd_soc_dai *dai)
+{
+ if (dai->driver->remove)
+ return dai->driver->remove(dai);
+ return 0;
+}