From: Koro Chen <koro.chen@mediatek.com>
To: <matthias.bgg@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
<tiwai@suse.de>
Cc: <srv_heupstream@mediatek.com>,
<linux-mediatek@lists.infradead.org>, <s.hauer@pengutronix.de>,
<lgirdwood@gmail.com>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>,
Koro Chen <koro.chen@mediatek.com>
Subject: [PATCH] ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
Date: Tue, 23 Jun 2015 19:01:20 +0800 [thread overview]
Message-ID: <1435057280-21316-1-git-send-email-koro.chen@mediatek.com> (raw)
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
next reply other threads:[~2015-06-23 11:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-23 11:01 Koro Chen [this message]
2015-06-23 11:11 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435057280-21316-1-git-send-email-koro.chen@mediatek.com \
--to=koro.chen@mediatek.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=s.hauer@pengutronix.de \
--cc=srv_heupstream@mediatek.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®