aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2020-03-09 13:08:21 +0900
committerMark Brown <broonie@kernel.org>2020-03-10 13:35:27 +0000
commit14596692631eadbefba8419698cccfc23bfccd2b (patch)
tree27f034fb740ba28588ebfc163bc30b940c6c8b42 /include/sound
parentASoC: soc-dapm: add for_each_card_dapms() macro (diff)
downloadwireguard-linux-14596692631eadbefba8419698cccfc23bfccd2b.tar.xz
wireguard-linux-14596692631eadbefba8419698cccfc23bfccd2b.zip
ASoC: soc-dapm: add for_each_card_widgets() macro
To be more readable code, this patch adds new for_each_card_widgets() macro, and replace existing code to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87r1y2goga.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-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 3aee33c8249e..03054bf9cd37 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1120,6 +1120,11 @@ struct snd_soc_card {
#define for_each_card_dapms(card, dapm) \
list_for_each_entry(dapm, &card->dapm_list, list)
+#define for_each_card_widgets(card, w)\
+ list_for_each_entry(w, &card->widgets, list)
+#define for_each_card_widgets_safe(card, w, _w) \
+ list_for_each_entry_safe(w, _w, &card->widgets, list)
+
/* SoC machine DAI configuration, glues a codec and cpu DAI together */
struct snd_soc_pcm_runtime {
struct device *dev;