1
0
Fork 0

ASoC: soc-core: use i on snd_soc_resume()

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>
alistair/sunxi64-5.4-dsi
Kuninori Morimoto 2019-05-13 16:06:07 +09:00 committed by Mark Brown
parent bcd9382288
commit 22d251a596
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 3 additions and 3 deletions

View 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);
}