diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 052089f16ea0..4b068ccf4e13 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1383,7 +1383,12 @@ static void soc_set_name_prefix(struct snd_soc_card *card, for (i = 0; i < card->num_configs; i++) { struct snd_soc_codec_conf *map = &card->codec_conf[i]; - if (map->of_node && component->dev->of_node != map->of_node) + struct device_node *component_of_node = component->dev->of_node; + + if (!component_of_node && component->dev->parent) + component_of_node = component->dev->parent->of_node; + + if (map->of_node && component_of_node != map->of_node) continue; if (map->dev_name && strcmp(component->name, map->dev_name)) continue;