ASoC: simple-card-utils: use for_each_pcm_streams()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 9 Mar 2020 04:02:37 +0000 (13:02 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 9 Mar 2020 14:25:03 +0000 (14:25 +0000)
We already have for_each_pcm_streams() macro.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zfei3aa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card-utils.c

index 320e648f7499148c61e52972a45ac81750baa647..abbdf1054f6fa2dd5aef20bfcaf153f9af7dcb83 100644 (file)
@@ -347,7 +347,7 @@ static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd,
        }
 
        /* Assumes the capabilities are the same for all supported streams */
-       for (stream = 0; stream < 2; stream++) {
+       for_each_pcm_streams(stream) {
                ret = snd_soc_runtime_calc_hw(rtd, &hw, stream);
                if (ret == 0)
                        break;