From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>,
Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
Syed Saba Kareem <syed.sabakareem@amd.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kees Cook <kees+treewide@kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
wangdicheng <wangdicheng@kylinos.cn>,
Chris Bainbridge <chris.bainbridge@gmail.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 1/5] ASoC: amd: ps: Use devm_pm_runtime_enable()
Date: Thu, 3 Dec 2026 16:45:54 +0700 [thread overview]
Message-ID: <20261203094558.26423-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261203094558.26423-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
Use devm_pm_runtime_enable() in the PDM and SoundWire DMA drivers
to automatically disable runtime PM when the devices are removed.
This allows removing their remove callbacks.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/amd/ps/ps-pdm-dma.c | 8 +-------
sound/soc/amd/ps/ps-sdw-dma.c | 8 +-------
2 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c
index 359ca10b9ba4..7a894e8688ae 100644
--- a/sound/soc/amd/ps/ps-pdm-dma.c
+++ b/sound/soc/amd/ps/ps-pdm-dma.c
@@ -400,13 +400,8 @@ static int acp63_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 acp63_pdm_audio_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(&pdev->dev);
}
static int acp63_pdm_resume(struct device *dev)
@@ -455,7 +450,6 @@ static const struct dev_pm_ops acp63_pdm_pm_ops = {
static struct platform_driver acp63_pdm_dma_driver = {
.probe = acp63_pdm_audio_probe,
- .remove = acp63_pdm_audio_remove,
.driver = {
.name = "acp_ps_pdm_dma",
.pm = pm_ptr(&acp63_pdm_pm_ops),
diff --git a/sound/soc/amd/ps/ps-sdw-dma.c b/sound/soc/amd/ps/ps-sdw-dma.c
index 6c510e6d9a18..5bf712bcd8c5 100644
--- a/sound/soc/amd/ps/ps-sdw-dma.c
+++ b/sound/soc/amd/ps/ps-sdw-dma.c
@@ -683,13 +683,8 @@ static int acp63_sdw_platform_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 acp63_sdw_platform_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
+ return devm_pm_runtime_enable(&pdev->dev);
}
static int acp63_restore_sdw_dma_config(struct sdw_dma_dev_data *sdw_data)
@@ -795,7 +790,6 @@ static const struct dev_pm_ops acp63_pm_ops = {
static struct platform_driver acp63_sdw_dma_driver = {
.probe = acp63_sdw_platform_probe,
- .remove = acp63_sdw_platform_remove,
.driver = {
.name = "amd_ps_sdw_dma",
.pm = pm_ptr(&acp63_pm_ops),
--
2.43.0
next prev parent reply other threads:[~2026-12-03 9:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 9:45 [PATCH 0/5] ASoC: amd: Use devm_pm_runtime_enable() phucduc.bui
2026-12-03 9:45 ` phucduc.bui [this message]
2026-12-03 9:45 ` [PATCH 2/5] ASoC: amd: raven: " phucduc.bui
2026-12-03 9:45 ` [PATCH 3/5] ASoC: amd: renoir: " phucduc.bui
2026-12-03 9:45 ` [PATCH 4/5] ASoC: amd: vangogh: " phucduc.bui
2026-12-03 9:45 ` [PATCH 5/5] ASoC: amd: yc: " phucduc.bui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261203094558.26423-2-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=broonie@kernel.org \
--cc=chris.bainbridge@gmail.com \
--cc=kees+treewide@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=syed.sabakareem@amd.com \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.com \
--cc=wangdicheng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox