From: Shengjiu Wang <shengjiu.wang@nxp.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Cc: kuninori.morimoto.gx@renesas.com
Subject: [PATCH] ASoC: ak4458: Add ak4458_reset in device probe and remove
Date: Tue, 13 Sep 2022 16:26:34 +0800 [thread overview]
Message-ID: <1663057594-29141-1-git-send-email-shengjiu.wang@nxp.com> (raw)
This patch fixup this warning when CONFIG_PM not defined
linux/sound/soc/codecs/ak4458.c:631:13: error: 'ak4458_reset' defined but\
not used [-Werror=unused-function]
631 | static void ak4458_reset(struct ak4458_priv *ak4458, bool active)
| ^~~~~~~~~~~~
cc1: all warnings being treated as errors
Fixes: e9e7df88996d64 ("ASoC: ak4458: Remove component probe() and remove()")
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
sound/soc/codecs/ak4458.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index b534212096ee..626310859814 100644
--- a/sound/soc/codecs/ak4458.c
+++ b/sound/soc/codecs/ak4458.c
@@ -781,12 +781,16 @@ static int ak4458_i2c_probe(struct i2c_client *i2c)
pm_runtime_enable(&i2c->dev);
regcache_cache_only(ak4458->regmap, true);
+ ak4458_reset(ak4458, false);
return 0;
}
static int ak4458_i2c_remove(struct i2c_client *i2c)
{
+ struct ak4458_priv *ak4458 = i2c_get_clientdata(i2c);
+
+ ak4458_reset(ak4458, true);
pm_runtime_disable(&i2c->dev);
return 0;
--
2.34.1
next reply other threads:[~2022-09-13 8:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 8:26 Shengjiu Wang [this message]
2022-09-13 16:12 ` Mark Brown
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=1663057594-29141-1-git-send-email-shengjiu.wang@nxp.com \
--to=shengjiu.wang@nxp.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--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
all inboxes | Powered by JetHome®