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: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
662e8d917f
commit
4623a614e8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user