diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2015-04-30 11:57:41 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-30 21:08:56 +0100 |
commit | 27796e755a2fc6707cdf9b484a56395f703e4f3d (patch) | |
tree | 6b0ea6ebded3d6acf2e2113d641b029a82a4523e | |
parent | b787f68c36d49bb1d9236f403813641efa74a031 (diff) | |
download | op-kernel-dev-27796e755a2fc6707cdf9b484a56395f703e4f3d.zip op-kernel-dev-27796e755a2fc6707cdf9b484a56395f703e4f3d.tar.gz |
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>
-rw-r--r-- | sound/soc/davinci/davinci-mcasp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index bb4b78e..23c91fa 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -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); |