Skip to contentSkip to conversation

ASoC: Drop unnecessary bias level check on resume

PATCH Applied Lars-Peter Clausen 2 participants 2 messages May 15, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 sound/soc/soc-core.c | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)
sound/soc/soc-core.c +3 -16
index 2373252..95b5f03 100644
@@ -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;
 		}
 	}
 
Signature · 1 line
1.8.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Lars-Peter Clausen

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.

Applied, thanks. I've got a feeling that's bitrot and wasn't always true...