[alsa-devel] [PATCH 02/11] ASoC: rename for_each_rtd_codec_dai_reverse to rollback

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Sep 18 03:28:30 CEST 2018


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

commit 0b7990e38971 ("ASoC: add for_each_rtd_codec_dai() macro")
added for_each_rtd_codec_dai_reverse(). but _rollback() is better
naming than _reverse(). This patch rename it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 include/sound/soc.h | 2 +-
 sound/soc/soc-pcm.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 1e093b3..ec1ae9f 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1164,7 +1164,7 @@ struct snd_soc_pcm_runtime {
 	for ((i) = 0;						       \
 	     ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]); \
 	     (i)++)
-#define for_each_rtd_codec_dai_reverse(rtd, i, dai)				\
+#define for_each_rtd_codec_dai_rollback(rtd, i, dai)		\
 	for (; ((i--) >= 0) && ((dai) = rtd->codec_dais[i]);)
 
 
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e387fff..1eff1db 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -621,7 +621,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
 	i = rtd->num_codecs;
 
 codec_dai_err:
-	for_each_rtd_codec_dai_reverse(rtd, i, codec_dai) {
+	for_each_rtd_codec_dai_rollback(rtd, i, codec_dai) {
 		if (codec_dai->driver->ops->shutdown)
 			codec_dai->driver->ops->shutdown(substream, codec_dai);
 	}
@@ -1015,7 +1015,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
 	i = rtd->num_codecs;
 
 codec_err:
-	for_each_rtd_codec_dai_reverse(rtd, i, codec_dai) {
+	for_each_rtd_codec_dai_rollback(rtd, i, codec_dai) {
 		if (codec_dai->driver->ops->hw_free)
 			codec_dai->driver->ops->hw_free(substream, codec_dai);
 		codec_dai->rate = 0;
-- 
2.7.4



More information about the Alsa-devel mailing list