diff options
author | 2018-09-18 01:31:09 +0000 | |
---|---|---|
committer | 2018-09-20 10:31:20 -0700 | |
commit | 8d6258a4dd267838e2f10643c3d91b79fe75ef6e (patch) | |
tree | 6210a8414e0e4ba18b232b06971147fcddc5abf5 /include | |
parent | ASoC: add for_each_dpcm_fe() macro (diff) | |
download | linux-8d6258a4dd267838e2f10643c3d91b79fe75ef6e.tar.gz linux-8d6258a4dd267838e2f10643c3d91b79fe75ef6e.tar.bz2 linux-8d6258a4dd267838e2f10643c3d91b79fe75ef6e.zip |
ASoC: add for_each_dpcm_be() macro
To be more readable code, this patch adds
new for_each_dpcm_be() 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')
-rw-r--r-- | include/sound/soc-dpcm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h index f130de6cfe8e..4be3a2b7c106 100644 --- a/include/sound/soc-dpcm.h +++ b/include/sound/soc-dpcm.h @@ -106,6 +106,13 @@ struct snd_soc_dpcm_runtime { #define for_each_dpcm_fe(be, stream, dpcm) \ list_for_each_entry(dpcm, &(be)->dpcm[stream].fe_clients, list_fe) +#define for_each_dpcm_be(fe, stream, dpcm) \ + list_for_each_entry(dpcm, &(fe)->dpcm[stream].be_clients, list_be) +#define for_each_dpcm_be_safe(fe, stream, dpcm, _dpcm) \ + list_for_each_entry_safe(dpcm, _dpcm, &(fe)->dpcm[stream].be_clients, list_be) +#define for_each_dpcm_be_rollback(fe, stream, dpcm) \ + list_for_each_entry_continue_reverse(dpcm, &(fe)->dpcm[stream].be_clients, list_be) + /* can this BE stop and free */ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream); |