Skip to content

Commit

Permalink
ASoC: mediatek: Fix unbalanced calls to runtime suspend/resume
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Koro Chen authored and Mark Brown committed Jun 23, 2015
1 parent 662e8d9 commit 4623a61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/mediatek/mtk-afe-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4623a61

Please sign in to comment.