diff options
author | Mark Brown <broonie@kernel.org> | 2015-11-20 19:23:22 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-11-20 19:23:22 +0000 |
commit | b590d5e2cac3d21d4dd6ae35344b03f03914db76 (patch) | |
tree | 8cd8705761ecd996d00a73757e185e1deccc7f40 /sound/soc/intel/atom | |
parent | 314038e40a62c7cdfc07aad0fe14dcd4383bc34d (diff) | |
parent | 1a497983a5ae62b4970187183fb3b40e68515a24 (diff) |
Merge branch 'topic/pcm-list' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel
Diffstat (limited to 'sound/soc/intel/atom')
-rw-r--r-- | sound/soc/intel/atom/sst-mfld-platform-pcm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c index 0487cfaac538..8e475e823205 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c @@ -760,15 +760,15 @@ static int sst_platform_remove(struct platform_device *pdev) static int sst_soc_prepare(struct device *dev) { struct sst_data *drv = dev_get_drvdata(dev); - int i; + struct snd_soc_pcm_runtime *rtd; /* suspend all pcms first */ snd_soc_suspend(drv->soc_card->dev); snd_soc_poweroff(drv->soc_card->dev); /* set the SSPs to idle */ - for (i = 0; i < drv->soc_card->num_rtd; i++) { - struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai; + list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) { + struct snd_soc_dai *dai = rtd->cpu_dai; if (dai->active) { send_ssp_cmd(dai, dai->name, 0); @@ -782,11 +782,11 @@ static int sst_soc_prepare(struct device *dev) static void sst_soc_complete(struct device *dev) { struct sst_data *drv = dev_get_drvdata(dev); - int i; + struct snd_soc_pcm_runtime *rtd; /* restart SSPs */ - for (i = 0; i < drv->soc_card->num_rtd; i++) { - struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai; + list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) { + struct snd_soc_dai *dai = rtd->cpu_dai; if (dai->active) { sst_handle_vb_timer(dai, true); |