diff options
author | Mark Brown <broonie@kernel.org> | 2019-02-06 17:31:39 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-02-06 17:31:39 +0000 |
commit | e29fe437ea5d926ea23d806b2468bf60ee8dc08a (patch) | |
tree | 958f74204fc7b15fb7a572c356bc15ac7384be01 /sound/soc/soc-core.c | |
parent | 47306401835a095843df8d87a51848f7e5e5099e (diff) | |
parent | c16e12010060c6c7a31f08b4a99513064cb53b7d (diff) |
Merge branch 'asoc-5.0' into asoc-5.1 for dapm table
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8c63d32ab2fe..994d21d7ba0f 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -742,12 +742,17 @@ static struct snd_soc_component *soc_find_component( const struct device_node *of_node, const char *name) { struct snd_soc_component *component; + struct device_node *component_of_node; lockdep_assert_held(&client_mutex); for_each_component(component) { if (of_node) { - if (component->dev->of_node == of_node) + component_of_node = component->dev->of_node; + if (!component_of_node && component->dev->parent) + component_of_node = component->dev->parent->of_node; + + if (component_of_node == of_node) return component; } else if (name && strcmp(component->name, name) == 0) { return component; @@ -960,7 +965,7 @@ static void soc_remove_dai(struct snd_soc_dai *dai, int order) { int err; - if (!dai || !dai->probed || + if (!dai || !dai->probed || !dai->driver || dai->driver->remove_order != order) return; |