* [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
@ 2015-06-23 11:01 ` Koro Chen
0 siblings, 0 replies; 5+ messages in thread
From: Koro Chen @ 2015-06-23 11:01 UTC (permalink / raw)
To: matthias.bgg, broonie, perex, tiwai
Cc: srv_heupstream, linux-mediatek, s.hauer, lgirdwood,
linux-arm-kernel, linux-kernel, alsa-devel, Koro Chen
This adds call to runtime suspend in dev remove. It fixs the problem that
suspend is not called in the case of CONFIG_PM=n. It also fixs build
warning when CONFIG_PM=n.
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
---
sound/soc/mediatek/mtk-afe-pcm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/mediatek/mtk-afe-pcm.c b/sound/soc/mediatek/mtk-afe-pcm.c
index cc228db..9863da7 100644
--- a/sound/soc/mediatek/mtk-afe-pcm.c
+++ b/sound/soc/mediatek/mtk-afe-pcm.c
@@ -1199,6 +1199,8 @@ err_pm_disable:
static int mtk_afe_pcm_dev_remove(struct platform_device *pdev)
{
pm_runtime_disable(&pdev->dev);
+ if (!pm_runtime_status_suspended(&pdev->dev))
+ mtk_afe_runtime_suspend(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
snd_soc_unregister_platform(&pdev->dev);
return 0;
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
@ 2015-06-23 11:01 ` Koro Chen
0 siblings, 0 replies; 5+ messages in thread
From: Koro Chen @ 2015-06-23 11:01 UTC (permalink / raw)
To: matthias.bgg, broonie, perex, tiwai
Cc: srv_heupstream, linux-mediatek, s.hauer, lgirdwood,
linux-arm-kernel, linux-kernel, alsa-devel, Koro Chen
This adds call to runtime suspend in dev remove. It fixs the problem that
suspend is not called in the case of CONFIG_PM=n. It also fixs build
warning when CONFIG_PM=n.
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
---
sound/soc/mediatek/mtk-afe-pcm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/mediatek/mtk-afe-pcm.c b/sound/soc/mediatek/mtk-afe-pcm.c
index cc228db..9863da7 100644
--- a/sound/soc/mediatek/mtk-afe-pcm.c
+++ b/sound/soc/mediatek/mtk-afe-pcm.c
@@ -1199,6 +1199,8 @@ err_pm_disable:
static int mtk_afe_pcm_dev_remove(struct platform_device *pdev)
{
pm_runtime_disable(&pdev->dev);
+ if (!pm_runtime_status_suspended(&pdev->dev))
+ mtk_afe_runtime_suspend(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
snd_soc_unregister_platform(&pdev->dev);
return 0;
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
@ 2015-06-23 11:01 ` Koro Chen
0 siblings, 0 replies; 5+ messages in thread
From: Koro Chen @ 2015-06-23 11:01 UTC (permalink / raw)
To: linux-arm-kernel
This adds call to runtime suspend in dev remove. It fixs the problem that
suspend is not called in the case of CONFIG_PM=n. It also fixs build
warning when CONFIG_PM=n.
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
---
sound/soc/mediatek/mtk-afe-pcm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/mediatek/mtk-afe-pcm.c b/sound/soc/mediatek/mtk-afe-pcm.c
index cc228db..9863da7 100644
--- a/sound/soc/mediatek/mtk-afe-pcm.c
+++ b/sound/soc/mediatek/mtk-afe-pcm.c
@@ -1199,6 +1199,8 @@ err_pm_disable:
static int mtk_afe_pcm_dev_remove(struct platform_device *pdev)
{
pm_runtime_disable(&pdev->dev);
+ if (!pm_runtime_status_suspended(&pdev->dev))
+ mtk_afe_runtime_suspend(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
snd_soc_unregister_platform(&pdev->dev);
return 0;
--
1.8.1.1.dirty
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
2015-06-23 11:01 ` Koro Chen
@ 2015-06-23 11:11 ` Mark Brown
-1 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-06-23 11:11 UTC (permalink / raw)
To: Koro Chen
Cc: matthias.bgg, perex, tiwai, srv_heupstream, linux-mediatek,
s.hauer, lgirdwood, linux-arm-kernel, linux-kernel, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On Tue, Jun 23, 2015 at 07:01:20PM +0800, Koro Chen wrote:
> This adds call to runtime suspend in dev remove. It fixs the problem that
> suspend is not called in the case of CONFIG_PM=n. It also fixs build
> warning when CONFIG_PM=n.
Applied, thanks (the stub does the right thing here if !CONFIG_PM).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
@ 2015-06-23 11:11 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-06-23 11:11 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jun 23, 2015 at 07:01:20PM +0800, Koro Chen wrote:
> This adds call to runtime suspend in dev remove. It fixs the problem that
> suspend is not called in the case of CONFIG_PM=n. It also fixs build
> warning when CONFIG_PM=n.
Applied, thanks (the stub does the right thing here if !CONFIG_PM).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150623/5fc19c56/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-23 11:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-23 11:01 [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume Koro Chen
2015-06-23 11:01 ` Koro Chen
2015-06-23 11:01 ` Koro Chen
2015-06-23 11:11 ` Mark Brown
2015-06-23 11:11 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.