[PATCH 3/5] ASoC: amd: renoir: Use devm_pm_runtime_enable()

From: phucduc . bui

Date: Thu Dec 03 2026 - 04:46:33 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

Use devm_pm_runtime_enable() in the PDM DMA driver to automatically
disable runtime PM when the device is removed.

This allows removing the remove callback.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/amd/renoir/acp3x-pdm-dma.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index bea1208f1702..f6e9335d238a 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -440,13 +440,8 @@ static int acp_pdm_audio_probe(struct platform_device *pdev)
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_mark_last_busy(&pdev->dev);
pm_runtime_set_active(&pdev->dev);
- pm_runtime_enable(&pdev->dev);
- return 0;
-}

-static void acp_pdm_audio_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(&pdev->dev);
}

static int acp_pdm_resume(struct device *dev)
@@ -497,7 +492,6 @@ static const struct dev_pm_ops acp_pdm_pm_ops = {

static struct platform_driver acp_pdm_dma_driver = {
.probe = acp_pdm_audio_probe,
- .remove = acp_pdm_audio_remove,
.driver = {
.name = "acp_rn_pdm_dma",
.pm = &acp_pdm_pm_ops,
--
2.43.0