aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-core.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a477e218aa28..c261eeb835b4 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1256,7 +1256,7 @@ static void soc_resume_deferred(struct work_struct *work)
1256int snd_soc_resume(struct device *dev) 1256int snd_soc_resume(struct device *dev)
1257{ 1257{
1258 struct snd_soc_card *card = dev_get_drvdata(dev); 1258 struct snd_soc_card *card = dev_get_drvdata(dev);
1259 int i; 1259 int i, ac97_control = 0;
1260 1260
1261 /* AC97 devices might have other drivers hanging off them so 1261 /* AC97 devices might have other drivers hanging off them so
1262 * need to resume immediately. Other drivers don't have that 1262 * need to resume immediately. Other drivers don't have that
@@ -1265,14 +1265,15 @@ int snd_soc_resume(struct device *dev)
1265 */ 1265 */
1266 for (i = 0; i < card->num_rtd; i++) { 1266 for (i = 0; i < card->num_rtd; i++) {
1267 struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai; 1267 struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
1268 if (cpu_dai->driver->ac97_control) { 1268 ac97_control |= cpu_dai->driver->ac97_control;
1269 dev_dbg(dev, "Resuming AC97 immediately\n"); 1269 }
1270 soc_resume_deferred(&card->deferred_resume_work); 1270 if (ac97_control) {
1271 } else { 1271 dev_dbg(dev, "Resuming AC97 immediately\n");
1272 dev_dbg(dev, "Scheduling resume work\n"); 1272 soc_resume_deferred(&card->deferred_resume_work);
1273 if (!schedule_work(&card->deferred_resume_work)) 1273 } else {
1274 dev_err(dev, "resume work item may be lost\n"); 1274 dev_dbg(dev, "Scheduling resume work\n");
1275 } 1275 if (!schedule_work(&card->deferred_resume_work))
1276 dev_err(dev, "resume work item may be lost\n");
1276 } 1277 }
1277 1278
1278 return 0; 1279 return 0;