Skip to content

Commit

Permalink
ASoC: davinci-mcasp: Correct pm status check in suspend callback
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Apr 30, 2015
1 parent b787f68 commit 27796e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 27796e7

Please sign in to comment.