]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: Drop unnecessary bias level check on resume
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 15 May 2015 10:41:30 +0000 (12:41 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 15 May 2015 15:49:39 +0000 (16:49 +0100)
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>
sound/soc/soc-core.c

index 23732523f87c72e24488e4655ff03cb5271b3f16..95b5f034d864ecf9e128f8c99792b20b5e84256c 100644 (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) {
-               /* 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) {
-                       switch (codec->dapm.bias_level) {
-                       case SND_SOC_BIAS_STANDBY:
-                       case SND_SOC_BIAS_OFF:
-                               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;
-                       }
+                       if (codec->driver->resume)
+                               codec->driver->resume(codec);
+                       codec->suspended = 0;
                }
        }