Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257470
b: refs/heads/master
c: 82e14e8
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed May 26, 2011
1 parent 36845a8 commit d3aa679
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6f7d7c8bf40800ac68e16302bb7627c59ea9168
refs/heads/master: 82e14e8bdd88b69018fe757192b01dd98582905e
19 changes: 10 additions & 9 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ static void soc_resume_deferred(struct work_struct *work)
int snd_soc_resume(struct device *dev)
{
struct snd_soc_card *card = dev_get_drvdata(dev);
int i;
int i, ac97_control = 0;

/* AC97 devices might have other drivers hanging off them so
* need to resume immediately. Other drivers don't have that
Expand All @@ -1265,14 +1265,15 @@ int snd_soc_resume(struct device *dev)
*/
for (i = 0; i < card->num_rtd; i++) {
struct snd_soc_dai *cpu_dai = card->rtd[i].cpu_dai;
if (cpu_dai->driver->ac97_control) {
dev_dbg(dev, "Resuming AC97 immediately\n");
soc_resume_deferred(&card->deferred_resume_work);
} else {
dev_dbg(dev, "Scheduling resume work\n");
if (!schedule_work(&card->deferred_resume_work))
dev_err(dev, "resume work item may be lost\n");
}
ac97_control |= cpu_dai->driver->ac97_control;
}
if (ac97_control) {
dev_dbg(dev, "Resuming AC97 immediately\n");
soc_resume_deferred(&card->deferred_resume_work);
} else {
dev_dbg(dev, "Scheduling resume work\n");
if (!schedule_work(&card->deferred_resume_work))
dev_err(dev, "resume work item may be lost\n");
}

return 0;
Expand Down

0 comments on commit d3aa679

Please sign in to comment.