summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-01-16 15:25:37 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-01-16 15:49:09 +0000
commit675c496ba4e751ea5b895c83219e3bb034f648ba (patch)
tree890eb4f315df48631b9c6fe9fa67abceb077397f /sound
parente7c80e2a8b403c10d805f48596efac741cce754d (diff)
downloadlinux-675c496ba4e751ea5b895c83219e3bb034f648ba.tar.bz2
ASoC: core - Free platform DAPM context at platform removal.
Fix platform removal by freeing the platform DAPM resources and remove it from the DAPM list. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3986520b4677..b5ecf6d23214 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -907,6 +907,10 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num, int order)
if (err < 0)
printk(KERN_ERR "asoc: failed to remove %s\n", platform->name);
}
+
+ /* Make sure all DAPM widgets are freed */
+ snd_soc_dapm_free(&platform->dapm);
+
platform->probed = 0;
list_del(&platform->card_list);
module_put(platform->dev->driver->owner);