Skip to content

Commit 79a6f2d

Browse files
ISCAS-Vulabbroonie
authored andcommitted
ASoC: mediatek: Fix double pm_runtime_disable in remove functions
Both mt8195-afe-pcm and mt8365-afe-pcm drivers use devm_pm_runtime_enable() in probe function, which automatically calls pm_runtime_disable() on device removal via devres mechanism. However, the remove callbacks explicitly call pm_runtime_disable() again, resulting in double pm_runtime_disable() calls. Fix by removing the redundant pm_runtime_disable() calls from remove functions, letting the devres framework handle it automatically. Fixes: 2ca0ec0 ("ASoC: mediatek: mt8195-afe-pcm: Simplify runtime PM during probe") Fixes: e1991d1 ("ASoC: mediatek: mt8365: Add the AFE driver support") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Link: https://patch.msgid.link/20251020170440.585-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 6b03360 commit 79a6f2d

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

sound/soc/mediatek/mt8195/mt8195-afe-pcm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,6 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
31763176

31773177
static void mt8195_afe_pcm_dev_remove(struct platform_device *pdev)
31783178
{
3179-
pm_runtime_disable(&pdev->dev);
31803179
if (!pm_runtime_status_suspended(&pdev->dev))
31813180
mt8195_afe_runtime_suspend(&pdev->dev);
31823181
}

sound/soc/mediatek/mt8365/mt8365-afe-pcm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,6 @@ static void mt8365_afe_pcm_dev_remove(struct platform_device *pdev)
22382238

22392239
mt8365_afe_disable_top_cg(afe, MT8365_TOP_CG_AFE);
22402240

2241-
pm_runtime_disable(&pdev->dev);
22422241
if (!pm_runtime_status_suspended(&pdev->dev))
22432242
mt8365_afe_runtime_suspend(&pdev->dev);
22442243
}

0 commit comments

Comments
 (0)