summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h1
-rw-r--r--sound/soc/soc-core.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a355d0f9a6f9..f8a79c17628e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -662,6 +662,7 @@ struct snd_soc_component {
unsigned int active;
unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
+ unsigned int registered_as_component:1;
struct list_head list;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 41bd24348520..3314efb365e3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3879,6 +3879,7 @@ int snd_soc_register_component(struct device *dev,
}
cmpnt->ignore_pmdown_time = true;
+ cmpnt->registered_as_component = true;
return __snd_soc_register_component(dev, cmpnt, cmpnt_drv, NULL,
dai_drv, num_dai, true);
@@ -3894,7 +3895,7 @@ void snd_soc_unregister_component(struct device *dev)
struct snd_soc_component *cmpnt;
list_for_each_entry(cmpnt, &component_list, list) {
- if (dev == cmpnt->dev)
+ if (dev == cmpnt->dev && cmpnt->registered_as_component)
goto found;
}
return;
OpenPOWER on IntegriCloud