[alsa-devel] [PATCH 1/3] ASoC: use list_add_tail() instead of list_add() for platform/codec/dai list
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Feb 5 11:11:06 CET 2013
Current ASoC is using list_add() in order to add new list to
platform/codec/dai list.
But it breaks added list's order.
This patch use list_add_tail() instead of list_add() to solve this issue.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/soc-core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 689eb04..63f2627 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3738,7 +3738,7 @@ int snd_soc_register_dai(struct device *dev,
if (!dai->codec)
dai->dapm.idle_bias_off = 1;
- list_add(&dai->list, &dai_list);
+ list_add_tail(&dai->list, &dai_list);
mutex_unlock(&client_mutex);
@@ -3829,7 +3829,7 @@ int snd_soc_register_dais(struct device *dev,
if (!dai->codec)
dai->dapm.idle_bias_off = 1;
- list_add(&dai->list, &dai_list);
+ list_add_tail(&dai->list, &dai_list);
mutex_unlock(&client_mutex);
@@ -3892,7 +3892,7 @@ int snd_soc_register_platform(struct device *dev,
mutex_init(&platform->mutex);
mutex_lock(&client_mutex);
- list_add(&platform->list, &platform_list);
+ list_add_tail(&platform->list, &platform_list);
mutex_unlock(&client_mutex);
dev_dbg(dev, "ASoC: Registered platform '%s'\n", platform->name);
@@ -4043,7 +4043,7 @@ int snd_soc_register_codec(struct device *dev,
}
mutex_lock(&client_mutex);
- list_add(&codec->list, &codec_list);
+ list_add_tail(&codec->list, &codec_list);
mutex_unlock(&client_mutex);
/* register any DAIs */
--
1.7.9.5
More information about the Alsa-devel
mailing list