[PATCH 03/11] ASoC: tegra: tegra210_adx: Use devm_pm_runtime_enable()
From: phucduc . bui
Date: Fri Dec 04 2026 - 06:23:37 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_adx.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 9b2d9f1db511..238527382a11 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -710,6 +710,10 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
tegra210_adx_dais[TEGRA_ADX_IN_DAI_ID].playback.channels_max =
adx->soc_data->max_ch;
+ err = devm_pm_runtime_enable(&pdev->dev);
+ if (err)
+ return err;
+
err = devm_snd_soc_register_component(dev, &tegra210_adx_cmpnt,
tegra210_adx_dais,
ARRAY_SIZE(tegra210_adx_dais));
@@ -717,16 +721,9 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
return dev_err_probe(dev, err,
"can't register ADX component\n");
- pm_runtime_enable(dev);
-
return 0;
}
-static void tegra210_adx_platform_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
-}
-
static const struct dev_pm_ops tegra210_adx_pm_ops = {
RUNTIME_PM_OPS(tegra210_adx_runtime_suspend,
tegra210_adx_runtime_resume, NULL)
@@ -740,7 +737,6 @@ static struct platform_driver tegra210_adx_driver = {
.pm = pm_ptr(&tegra210_adx_pm_ops),
},
.probe = tegra210_adx_platform_probe,
- .remove = tegra210_adx_platform_remove,
};
module_platform_driver(tegra210_adx_driver);
--
2.43.0