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

From: phucduc . bui

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


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

Use devm_pm_runtime_enable() in the ACP6x 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/yc/acp6x-pdm-dma.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sound/soc/amd/yc/acp6x-pdm-dma.c b/sound/soc/amd/yc/acp6x-pdm-dma.c
index 3f8c73a1f182..5a6a4c8b8af2 100644
--- a/sound/soc/amd/yc/acp6x-pdm-dma.c
+++ b/sound/soc/amd/yc/acp6x-pdm-dma.c
@@ -393,13 +393,8 @@ static int acp6x_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 acp6x_pdm_audio_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(&pdev->dev);
}

static int acp6x_pdm_resume(struct device *dev)
@@ -448,7 +443,6 @@ static const struct dev_pm_ops acp6x_pdm_pm_ops = {

static struct platform_driver acp6x_pdm_dma_driver = {
.probe = acp6x_pdm_audio_probe,
- .remove = acp6x_pdm_audio_remove,
.driver = {
.name = "acp_yc_pdm_dma",
.pm = pm_ptr(&acp6x_pdm_pm_ops),
--
2.43.0