Skip to contentSkip to conversation

ASoC: davinci-mcasp: Correct pm status check in suspend callback

PATCH Applied Peter Ujfalusi 2 participants 2 messages Apr 30, 2015

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

PATCH 1/1 ASoC: davinci-mcasp: Correct pm status check in suspend callback

pm_runtime_enabled() will only tell if the pm runtime has been enabled for the device, which is done at probe time but will not tell the actual power state of the device.
pm_runtime_active() provides this information.
This patch fixes a kernel crash when doing suspend when McASP is not active.

---
Mark,

can you schedule this for the next -rc?

Thank you,
Peter

 sound/soc/davinci/davinci-mcasp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/davinci/davinci-mcasp.c +1 -1
index ddf7e97d8f0b..1ab3fcdc6bba 100644
@@ -1247,7 +1247,7 @@ static int davinci_mcasp_suspend(struct snd_soc_dai *dai)
 	u32 reg;
 	int i;
 
-	context->pm_state = pm_runtime_enabled(mcasp->dev);
+	context->pm_state = pm_runtime_active(mcasp->dev);
 	if (!context->pm_state)
 		pm_runtime_get_sync(mcasp->dev);
 
Signature · 1 line
2.3.5
maintainer Applied
#1 lore raw
Quoted 6 lines · Peter Ujfalusi

pm_runtime_enabled() will only tell if the pm runtime has been enabled for the device, which is done at probe time but will not tell the actual power state of the device.
pm_runtime_active() provides this information.
This patch fixes a kernel crash when doing suspend when McASP is not active.

Applied, thanks.