[PATCH 06/11] ASoC: tegra: tegra210_dmic: Use devm_pm_runtime_enable()
From: phucduc . bui
Date: Fri Dec 04 2026 - 06:23:54 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_dmic.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c
index 3123057abfe8..4a9e7d0f1c57 100644
--- a/sound/soc/tegra/tegra210_dmic.c
+++ b/sound/soc/tegra/tegra210_dmic.c
@@ -522,6 +522,10 @@ static int tegra210_dmic_probe(struct platform_device *pdev)
regcache_cache_only(dmic->regmap, true);
+ err = devm_pm_runtime_enable(dev);
+ if (err)
+ return err;
+
err = devm_snd_soc_register_component(dev, &tegra210_dmic_compnt,
tegra210_dmic_dais,
ARRAY_SIZE(tegra210_dmic_dais));
@@ -529,16 +533,9 @@ static int tegra210_dmic_probe(struct platform_device *pdev)
return dev_err_probe(dev, err,
"can't register DMIC component\n");
- pm_runtime_enable(dev);
-
return 0;
}
-static void tegra210_dmic_remove(struct platform_device *pdev)
-{
- pm_runtime_disable(&pdev->dev);
-}
-
static const struct dev_pm_ops tegra210_dmic_pm_ops = {
RUNTIME_PM_OPS(tegra210_dmic_runtime_suspend,
tegra210_dmic_runtime_resume, NULL)
@@ -558,7 +555,6 @@ static struct platform_driver tegra210_dmic_driver = {
.pm = pm_ptr(&tegra210_dmic_pm_ops),
},
.probe = tegra210_dmic_probe,
- .remove = tegra210_dmic_remove,
};
module_platform_driver(tegra210_dmic_driver)
--
2.43.0