diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2020-02-10 12:14:22 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-02-11 15:41:16 +0000 |
commit | 09e88f8a5c56ac5258935a5a543868c20a55d4dd (patch) | |
tree | e0bf8ea05fe1467ee288891c51fc6bc4f5c32140 /include/sound/soc-dapm.h | |
parent | 5c25bd641a7b195b5ed71ce9d6955618bae7b7d3 (diff) |
ASoC: soc-pcm: add for_each_dapm_widgets() macro
This patch adds new for_each_dapm_widgets() macro and use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/878slbceyg.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r-- | include/sound/soc-dapm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 2a306c6f3fbc..9439e75945f6 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -693,6 +693,11 @@ struct snd_soc_dapm_widget_list { struct snd_soc_dapm_widget *widgets[0]; }; +#define for_each_dapm_widgets(list, i, widget) \ + for ((i) = 0; \ + (i) < list->num_widgets && (widget = list->widgets[i]); \ + (i)++) + struct snd_soc_dapm_stats { int power_checks; int path_checks; |