From: phucduc.bui@gmail.com
To: Mark Brown <broonie@kernel.org>, Shengjiu Wang <shengjiu.wang@nxp.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Kees Cook <kees+treewide@kernel.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 1/2] ASoC: codecs: ak4458: Use devm_pm_runtime_enable()
Date: Fri, 4 Dec 2026 18:26:25 +0700 [thread overview]
Message-ID: <20261204112626.63927-2-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20261204112626.63927-1-phucduc.bui@gmail.com>
From: bui duc phuc <phucduc.bui@gmail.com>
Replace pm_runtime_enable() with devm_pm_runtime_enable()
and remove the redundant remove callback.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
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
next prev parent reply other threads:[~2026-12-04 11:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 11:26 [PATCH 0/2] ASoC: codecs: ak4xxx: Use devm_pm_runtime_enable() phucduc.bui
2026-12-04 11:26 ` phucduc.bui [this message]
2026-12-04 11:26 ` [PATCH 2/2] ASoC: codecs: ak5558: " phucduc.bui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204112626.63927-2-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=broonie@kernel.org \
--cc=kees+treewide@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shengjiu.wang@nxp.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox