Browse Source

soc: swr-mstr: check swrm->state in swr_runtime_suepend

in swrm_runtime_suspend, current_state is not updated and
causes audio_core_vote is not disabled. Update to check
swrm->state to resolve this issue.

Change-Id: I2c5be360fe5ddd964d7bc45696e254579aae5392
Signed-off-by: Meng Wang <[email protected]>
Meng Wang 4 years ago
parent
commit
91437a36ea
1 changed files with 1 additions and 1 deletions
  1. 1 1
      soc/swr-mstr-ctrl.c

+ 1 - 1
soc/swr-mstr-ctrl.c

@@ -3250,7 +3250,7 @@ static int swrm_runtime_suspend(struct device *dev)
 		swrm->state = SWR_MSTR_DOWN;
 
 exit:
-	if (current_state != SWR_MSTR_UP) {
+	if (swrm->state != SWR_MSTR_UP) {
 		if (swrm_request_hw_vote(swrm, LPASS_AUDIO_CORE, false))
 			dev_dbg(dev, "%s:lpass audio hw enable failed\n",
 			__func__);