[PATCH 05/11] ASoC: tegra: tegra210_amx: Use devm_pm_runtime_enable()

From: phucduc . bui

Date: Fri Dec 04 2026 - 06:23:45 EST


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

Replace pm_runtime_enable() with devm_pm_runtime_enable()
and remove the redundant remove callback.

Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/tegra/tegra210_amx.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c
index 2288656a3278..a549995896ff 100644
--- a/sound/soc/tegra/tegra210_amx.c
+++ b/sound/soc/tegra/tegra210_amx.c
@@ -763,6 +763,10 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev)
tegra210_amx_dais[TEGRA_AMX_OUT_DAI_ID].capture.channels_max =
amx->soc_data->max_ch;

+ err = devm_pm_runtime_enable(dev);
+ if (err)
+ return err;
+
err = devm_snd_soc_register_component(dev, &tegra210_amx_cmpnt,
tegra210_amx_dais,
ARRAY_SIZE(tegra210_amx_dais));
@@ -770,16 +774,9 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev)
return dev_err_probe(dev, err,
"can't register AMX component\n");

- pm_runtime_enable(dev);
-
return 0;
}

-static void tegra210_amx_platform_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
-}
-
static const struct dev_pm_ops tegra210_amx_pm_ops = {
RUNTIME_PM_OPS(tegra210_amx_runtime_suspend,
tegra210_amx_runtime_resume, NULL)
@@ -793,7 +790,6 @@ static struct platform_driver tegra210_amx_driver = {
.pm = pm_ptr(&tegra210_amx_pm_ops),
},
.probe = tegra210_amx_platform_probe,
- .remove = tegra210_amx_platform_remove,
};
module_platform_driver(tegra210_amx_driver);

--
2.43.0