[PATCH 1/2] ASoC: codecs: ak4458: Use devm_pm_runtime_enable()

From: phucduc . bui

Date: Fri Dec 04 2026 - 06:27:00 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/codecs/ak4458.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index 11b5e4cc11f8..9683e775a564 100644
--- a/sound/soc/codecs/ak4458.c
+++ b/sound/soc/codecs/ak4458.c
@@ -782,6 +782,11 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
return ret;
}

+ ret = devm_pm_runtime_enable(&i2c->dev);
+ if (ret)
+ return ret;
+ regcache_cache_only(ak4458->regmap, true);
+
ret = devm_snd_soc_register_component(ak4458->dev,
ak4458->drvdata->comp_drv,
ak4458->drvdata->dai_drv, 1);
@@ -790,17 +795,9 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
return ret;
}

- pm_runtime_enable(&i2c->dev);
- regcache_cache_only(ak4458->regmap, true);
-
return 0;
}

-static void ak4458_i2c_remove(struct i2c_client *i2c)
-{
- pm_runtime_disable(&i2c->dev);
-}
-
static const struct of_device_id ak4458_of_match[] = {
{ .compatible = "asahi-kasei,ak4458", .data = &ak4458_drvdata},
{ .compatible = "asahi-kasei,ak4497", .data = &ak4497_drvdata},
@@ -815,7 +812,6 @@ static struct i2c_driver ak4458_i2c_driver = {
.of_match_table = ak4458_of_match,
},
.probe = ak4458_i2c_probe,
- .remove = ak4458_i2c_remove,
};

module_i2c_driver(ak4458_i2c_driver);
--
2.43.0