提交 4623a614 编写于 作者: K Koro Chen 提交者: Mark Brown

ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume

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: NKoro Chen <koro.chen@mediatek.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 662e8d91
......@@ -1199,6 +1199,8 @@ static int mtk_afe_pcm_dev_probe(struct platform_device *pdev)
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册