mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
b787f68c36
commit
27796e755a
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue