[PATCH 2/5] ASoC: amd: raven: Use devm_pm_runtime_enable()
From: phucduc . bui
Date: Thu Dec 03 2026 - 04:46:27 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Use devm_pm_runtime_enable() to automatically disable runtime PM
when the device is removed, allowing the remove callback to be
removed.
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/amd/raven/acp3x-pcm-dma.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma.c
index 700c0ca20e18..da8ae707a04d 100644
--- a/sound/soc/amd/raven/acp3x-pcm-dma.c
+++ b/sound/soc/amd/raven/acp3x-pcm-dma.c
@@ -426,13 +426,8 @@ static int acp3x_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 acp3x_audio_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(&pdev->dev);
}
static int acp3x_resume(struct device *dev)
@@ -517,7 +512,6 @@ static const struct dev_pm_ops acp3x_pm_ops = {
static struct platform_driver acp3x_dma_driver = {
.probe = acp3x_audio_probe,
- .remove = acp3x_audio_remove,
.driver = {
.name = "acp3x_rv_i2s_dma",
.pm = &acp3x_pm_ops,
--
2.43.0