[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1663057594-29141-1-git-send-email-shengjiu.wang@nxp.com>
Date: Tue, 13 Sep 2022 16:26:34 +0800
From: Shengjiu Wang <shengjiu.wang@....com>
To: lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
tiwai@...e.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Cc: kuninori.morimoto.gx@...esas.com
Subject: [PATCH] ASoC: ak4458: Add ak4458_reset in device probe and remove
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@...esas.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@....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
Powered by blists - more mailing lists