[PATCH 04/11] ASoC: tegra: tegra210_ahub: Use devm_pm_runtime_enable()
From: phucduc . bui
Date: Fri Dec 04 2026 - 06:23:44 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_ahub.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index 3deaa599f53a..943bd335eadc 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -2632,6 +2632,10 @@ static int tegra_ahub_probe(struct platform_device *pdev)
regcache_cache_only(ahub->regmap, true);
+ err = devm_pm_runtime_enable(&pdev->dev);
+ if (err)
+ return err;
+
err = devm_snd_soc_register_component(&pdev->dev,
ahub->soc_data->cmpnt_drv,
ahub->soc_data->dai_drv,
@@ -2640,23 +2644,14 @@ static int tegra_ahub_probe(struct platform_device *pdev)
return dev_err_probe(&pdev->dev, err,
"can't register AHUB component\n");
- pm_runtime_enable(&pdev->dev);
-
err = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
- if (err) {
- pm_runtime_disable(&pdev->dev);
+ if (err)
return dev_err_probe(&pdev->dev, err,
"failed to populate child nodes\n");
- }
return 0;
}
-static void tegra_ahub_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
-}
-
static const struct dev_pm_ops tegra_ahub_pm_ops = {
RUNTIME_PM_OPS(tegra_ahub_runtime_suspend,
tegra_ahub_runtime_resume, NULL)
@@ -2665,7 +2660,6 @@ static const struct dev_pm_ops tegra_ahub_pm_ops = {
static struct platform_driver tegra_ahub_driver = {
.probe = tegra_ahub_probe,
- .remove = tegra_ahub_remove,
.driver = {
.name = "tegra210-ahub",
.of_match_table = tegra_ahub_of_match,
--
2.43.0