ASoC: rsnd: use for_each_rsnd_mod_xxx() on rsnd_rdai_continuance_probe()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 19 Oct 2016 03:57:27 +0000 (03:57 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 24 Oct 2016 17:23:29 +0000 (18:23 +0100)
Now, we have for_each_rsnd_mod(), let's use it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c

index aba49b2b010316af5c4ca04ab00cf9052a1c4d10..ea14a1470de26b9a379789224e4a6fd1a520f0ac 100644 (file)
@@ -1122,6 +1122,7 @@ static int rsnd_rdai_continuance_probe(struct rsnd_priv *priv,
        ret = rsnd_dai_call(probe, io, priv);
        if (ret == -EAGAIN) {
                struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
+               struct rsnd_mod *mod;
                int i;
 
                /*
@@ -1141,8 +1142,8 @@ static int rsnd_rdai_continuance_probe(struct rsnd_priv *priv,
                 * remove all mod from io
                 * and, re connect ssi
                 */
-               for (i = 0; i < RSND_MOD_MAX; i++)
-                       rsnd_dai_disconnect((io)->mod[i], io, i);
+               for_each_rsnd_mod(i, mod, io)
+                       rsnd_dai_disconnect(mod, io, i);
                rsnd_dai_connect(ssi_mod, io, RSND_MOD_SSI);
 
                /*