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

From: phucduc . bui

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

diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c
index f4b3cb6f3c00..9cebcaf8b74c 100644
--- a/sound/soc/codecs/ak5558.c
+++ b/sound/soc/codecs/ak5558.c
@@ -465,6 +465,11 @@ static int ak5558_i2c_probe(struct i2c_client *i2c)
return ret;
}

+ ret = devm_pm_runtime_enable(&i2c->dev);
+ if (ret)
+ return ret;
+ regcache_cache_only(ak5558->regmap, true);
+
dev_id = (uintptr_t)of_device_get_match_data(&i2c->dev);
switch (dev_id) {
case AK5552:
@@ -486,17 +491,9 @@ static int ak5558_i2c_probe(struct i2c_client *i2c)
return ret;
}

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

-static void ak5558_i2c_remove(struct i2c_client *i2c)
-{
- pm_runtime_disable(&i2c->dev);
-}
-
static const struct of_device_id ak5558_i2c_dt_ids[] __maybe_unused = {
{ .compatible = "asahi-kasei,ak5558", .data = (void *) AK5558 },
{ .compatible = "asahi-kasei,ak5552", .data = (void *) AK5552 },
@@ -511,7 +508,6 @@ static struct i2c_driver ak5558_i2c_driver = {
.pm = pm_ptr(&ak5558_pm),
},
.probe = ak5558_i2c_probe,
- .remove = ak5558_i2c_remove,
};

module_i2c_driver(ak5558_i2c_driver);
--
2.43.0