aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2019-12-10 09:34:52 +0900
committerMark Brown <[email protected]>2019-12-10 13:19:01 +0000
commitaec3ff99ce4a02d9bbe8b7311136edc69bdb739d (patch)
treed6dd8e6393c6e02251a64a1349860b869a0298b8
parent4702f99148dae94b00bcb7bbba6cd9ca01651e69 (diff)
ASoC: soc-core: soc_set_name_prefix(): get component device_node at out of loop
Component device_node is not related to codec_conf loop at soc_set_name_prefix(). This patch moves it to out of loop. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a483f6fc50a0..f662d677229b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1209,11 +1209,11 @@ static void soc_set_of_name_prefix(struct snd_soc_component *component)
static void soc_set_name_prefix(struct snd_soc_card *card,
struct snd_soc_component *component)
{
+ struct device_node *of_node = soc_component_to_node(component);
int i;
for (i = 0; i < card->num_configs; i++) {
struct snd_soc_codec_conf *map = &card->codec_conf[i];
- struct device_node *of_node = soc_component_to_node(component);
if (map->of_node && of_node != map->of_node)
continue;