[PATCH] ASoC: ak4458.c: move ak4458_reset() under CONFIG_PM
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
This patch fixup this warning
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()") Cc: Shengjiu Wang shengjiu.wang@nxp.com Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/codecs/ak4458.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c index b534212096ee..4735aae3bfbd 100644 --- a/sound/soc/codecs/ak4458.c +++ b/sound/soc/codecs/ak4458.c @@ -628,6 +628,7 @@ static struct snd_soc_dai_driver ak4497_dai = { .ops = &ak4458_dai_ops, };
+#ifdef CONFIG_PM static void ak4458_reset(struct ak4458_priv *ak4458, bool active) { if (ak4458->reset_gpiod) { @@ -636,7 +637,6 @@ static void ak4458_reset(struct ak4458_priv *ak4458, bool active) } }
-#ifdef CONFIG_PM static int __maybe_unused ak4458_runtime_suspend(struct device *dev) { struct ak4458_priv *ak4458 = dev_get_drvdata(dev);
On Fri, Sep 09, 2022 at 02:54:34AM +0000, Kuninori Morimoto wrote:
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
This patch fixup this warning
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()")
Is this the best fix, or should we be adding _reset() calls into the device level probe() and remove() functions?
Actually I'm not sure the driver works without CONFIG_PM since the probe isn't powering on the device but then that's not a super realistic use case anyway.
Hi Mark
This patch fixup this warning
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()")
Is this the best fix, or should we be adding _reset() calls into the device level probe() and remove() functions?
Hmm... I'm not familiar with ak4458.c. Is your opinion for original patch ? or this patch ? This patch is just trying to fix the compile issue.
Thank you for your help !!
Best regards --- Kuninori Morimoto
participants (2)
-
Kuninori Morimoto
-
Mark Brown