ASoC: Drop unnecessary bias level check on resume

The suspended flag will only be set if the CODEC bias level was either
STANDBY or OFF. This means we don't need to check for that on resume since
the condition will always be true.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Lars-Peter Clausen 2015-05-15 12:41:30 +02:00 committed by Mark Brown
parent d9dd37305e
commit b8faaba4a6

View File

@ -750,23 +750,10 @@ static void soc_resume_deferred(struct work_struct *work)
} }
list_for_each_entry(codec, &card->codec_dev_list, card_list) { list_for_each_entry(codec, &card->codec_dev_list, card_list) {
/* If the CODEC was idle over suspend then it will have been
* left with bias OFF or STANDBY and suspended so we must now
* resume. Otherwise the suspend was suppressed.
*/
if (codec->suspended) { if (codec->suspended) {
switch (codec->dapm.bias_level) { if (codec->driver->resume)
case SND_SOC_BIAS_STANDBY: codec->driver->resume(codec);
case SND_SOC_BIAS_OFF: codec->suspended = 0;
if (codec->driver->resume)
codec->driver->resume(codec);
codec->suspended = 0;
break;
default:
dev_dbg(codec->dev,
"ASoC: CODEC was on over suspend\n");
break;
}
} }
} }