* [PATCH] ASoC: davinci-mcasp: Correct pm status check in suspend callback
@ 2015-04-30 8:57 Peter Ujfalusi
2015-04-30 20:09 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2015-04-30 8:57 UTC (permalink / raw)
To: Mark Brown, lgirdwood; +Cc: alsa-devel
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>
---
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(-)
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index ddf7e97d8f0b..1ab3fcdc6bba 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);
--
2.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: davinci-mcasp: Correct pm status check in suspend callback
2015-04-30 8:57 [PATCH] ASoC: davinci-mcasp: Correct pm status check in suspend callback Peter Ujfalusi
@ 2015-04-30 20:09 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-04-30 20:09 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: alsa-devel, lgirdwood
[-- Attachment #1.1: Type: text/plain, Size: 389 bytes --]
On Thu, Apr 30, 2015 at 11:57:41AM +0300, Peter Ujfalusi wrote:
> 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.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-30 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-30 8:57 [PATCH] ASoC: davinci-mcasp: Correct pm status check in suspend callback Peter Ujfalusi
2015-04-30 20:09 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox