Commit ee10fbe1 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
parent 7083f877
...@@ -237,7 +237,7 @@ static int dmaengine_pcm_new(struct snd_soc_component *component, ...@@ -237,7 +237,7 @@ static int dmaengine_pcm_new(struct snd_soc_component *component,
max_buffer_size = SIZE_MAX; max_buffer_size = SIZE_MAX;
} }
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) { for_each_pcm_streams(i) {
substream = rtd->pcm->streams[i].substream; substream = rtd->pcm->streams[i].substream;
if (!substream) if (!substream)
continue; continue;
...@@ -371,8 +371,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm, ...@@ -371,8 +371,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
dev = config->dma_dev; dev = config->dma_dev;
} }
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; for_each_pcm_streams(i) {
i++) {
if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) if (pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX)
name = "rx-tx"; name = "rx-tx";
else else
...@@ -401,8 +400,7 @@ static void dmaengine_pcm_release_chan(struct dmaengine_pcm *pcm) ...@@ -401,8 +400,7 @@ static void dmaengine_pcm_release_chan(struct dmaengine_pcm *pcm)
{ {
unsigned int i; unsigned int i;
for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; for_each_pcm_streams(i) {
i++) {
if (!pcm->chan[i]) if (!pcm->chan[i])
continue; continue;
dma_release_channel(pcm->chan[i]); dma_release_channel(pcm->chan[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment