summaryrefslogtreecommitdiff
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-09-21 05:23:17 +0000
committerMark Brown <broonie@kernel.org>2018-09-21 10:12:44 -0700
commit15a0c64572463eddf59e80aa643d3a87809a7d9b (patch)
treeff2aa9936775d67a9fa03cec3efbfc1d6d55f6b2 /include/sound/soc.h
parent368dee9459472b44f760a35cd07a6f3b90b3e549 (diff)
ASoC: add for_each_component_dais() macro
To be more readable code, this patch adds new for_each_component_dais() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 93aa894a57ef..f1dab1f4b194 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -864,6 +864,11 @@ struct snd_soc_component {
#endif
};
+#define for_each_component_dais(component, dai)\
+ list_for_each_entry(dai, &(component)->dai_list, list)
+#define for_each_component_dais_safe(component, dai, _dai)\
+ list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)
+
struct snd_soc_rtdcom_list {
struct snd_soc_component *component;
struct list_head list; /* rtd::component_list */