summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-09-18 01:29:55 +0000
committerMark Brown <broonie@kernel.org>2018-09-20 10:22:58 -0700
commitf70f18f7d459b7958a4d3944396e2bc4a9f7ed72 (patch)
tree582fe6db59657040b02a73ae05822468c190b906 /include/sound
parentbcb1fd1fcd6507ba5a1f8610550135dc367aedb7 (diff)
ASoC: add for_each_card_components() macro
To be more readable code, this patch adds new for_each_card_components() 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')
-rw-r--r--include/sound/soc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 164418dbf40e..34efab6baff6 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1135,6 +1135,9 @@ struct snd_soc_card {
#define for_each_card_rtds_safe(card, rtd, _rtd) \
list_for_each_entry_safe(rtd, _rtd, &(card)->rtd_list, list)
+#define for_each_card_components(card, component) \
+ list_for_each_entry(component, &(card)->component_dev_list, card_list)
+
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_pcm_runtime {
struct device *dev;