summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen2014-09-04 19:44:04 +0200
committerMark Brown2014-09-04 21:10:25 +0200
commit01e0df6647e713469466c7bb6d7157c2e3046192 (patch)
tree81851a0bc509ccedb9444435ad5834d784b67931 /sound/soc/soc-core.c
parentMerge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadkernel-qcow2-linux-01e0df6647e713469466c7bb6d7157c2e3046192.tar.gz
kernel-qcow2-linux-01e0df6647e713469466c7bb6d7157c2e3046192.tar.xz
kernel-qcow2-linux-01e0df6647e713469466c7bb6d7157c2e3046192.zip
ASoC: Set card->instantiated to false when removing the card
Set card->instantiated to false when the card is removed to make sure that operations that expect the card to be fully instantiated do not run anymore during card removal. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1b422c5c36c8..ff9d2892f473 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3810,8 +3810,10 @@ EXPORT_SYMBOL_GPL(snd_soc_register_card);
*/
int snd_soc_unregister_card(struct snd_soc_card *card)
{
- if (card->instantiated)
+ if (card->instantiated) {
+ card->instantiated = false;
soc_cleanup_card_resources(card);
+ }
dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n", card->name);
return 0;