[PATCH 4/5] ASoC: amd: vangogh: Use devm_pm_runtime_enable()
From: phucduc . bui
Date: Thu Dec 03 2026 - 04:46:38 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Use devm_pm_runtime_enable() in the ACP5x PCM 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/vangogh/acp5x-pcm-dma.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sound/soc/amd/vangogh/acp5x-pcm-dma.c b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
index 8b09e66610b5..c52288c4c9a8 100644
--- a/sound/soc/amd/vangogh/acp5x-pcm-dma.c
+++ b/sound/soc/amd/vangogh/acp5x-pcm-dma.c
@@ -417,13 +417,8 @@ static int acp5x_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 acp5x_audio_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(&pdev->dev);
}
static int acp5x_pcm_resume(struct device *dev)
@@ -504,7 +499,6 @@ static const struct dev_pm_ops acp5x_pm_ops = {
static struct platform_driver acp5x_dma_driver = {
.probe = acp5x_audio_probe,
- .remove = acp5x_audio_remove,
.driver = {
.name = "acp5x_i2s_dma",
.pm = &acp5x_pm_ops,
--
2.43.0