ASoC: soc-core: use i on snd_soc_resume()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 13 May 2019 07:06:07 +0000 (16:06 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 13 May 2019 11:43:46 +0000 (12:43 +0100)
This patch uses "int i" instead of "int j" on snd_soc_resume(),
and moves struct snd_soc_dai *codec_dai to top of this function.
This is cleanup and prepare for Multi CPU support

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

index 2403bec2fccf35ad4b1752bba204454c4bd2b6cf..0d9b02075050a1611e38443f02eeedb292e5c48e 100644 (file)
@@ -687,6 +687,8 @@ int snd_soc_resume(struct device *dev)
        struct snd_soc_card *card = dev_get_drvdata(dev);
        bool bus_control = false;
        struct snd_soc_pcm_runtime *rtd;
+       struct snd_soc_dai *codec_dai;
+       int i;
 
        /* If the card is not initialized yet there is nothing to do */
        if (!card->instantiated)
@@ -694,14 +696,12 @@ int snd_soc_resume(struct device *dev)
 
        /* activate pins from sleep state */
        for_each_card_rtds(card, rtd) {
-               struct snd_soc_dai *codec_dai;
                struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-               int j;
 
                if (cpu_dai->active)
                        pinctrl_pm_select_default_state(cpu_dai->dev);
 
-               for_each_rtd_codec_dai(rtd, j, codec_dai) {
+               for_each_rtd_codec_dai(rtd, i, codec_dai) {
                        if (codec_dai->active)
                                pinctrl_pm_select_default_state(codec_dai->dev);
                }