linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8731: Fix a unused function gcc warning
@ 2018-09-30  1:45 zhong jiang
  2018-09-30  2:17 ` Joe Perches
  2018-09-30  2:25 ` kbuild test robot
  0 siblings, 2 replies; 4+ messages in thread
From: zhong jiang @ 2018-09-30  1:45 UTC (permalink / raw)
  To: broonie; +Cc: perex, tiwai, lgirdwood, linux-kernel

Fix the following compile warning:

sound/soc/codecs/wm8731.c:575:12: warning: 'wm8731_request_supplies' defined but not used [-Wunused-function]
sound/soc/codecs/wm8731.c:600:12: warning: 'wm8731_hw_init' defined but not used [-Wunused-function]

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 sound/soc/codecs/wm8731.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 7c8fad8..b5dc6ba2 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -36,12 +36,15 @@
 #include "wm8731.h"
 
 #define WM8731_NUM_SUPPLIES 4
+
+#if defined(CONFIG_I2C) || defined(CONFIG_SPI_MASTER)
 static const char *wm8731_supply_names[WM8731_NUM_SUPPLIES] = {
 	"AVDD",
 	"HPVDD",
 	"DCVDD",
 	"DBVDD",
 };
+#endif
 
 /* codec private data */
 struct wm8731_priv {
@@ -572,6 +575,7 @@ static int wm8731_startup(struct snd_pcm_substream *substream,
 	.symmetric_rates = 1,
 };
 
+#if defined(CONFIG_I2C) || defined(CONFIG_SPI_MASTER)
 static int wm8731_request_supplies(struct device *dev,
 		struct wm8731_priv *wm8731)
 {
@@ -627,6 +631,7 @@ static int wm8731_hw_init(struct device *dev, struct wm8731_priv *wm8731)
 
 	return ret;
 }
+#endif
 
 static const struct snd_soc_component_driver soc_component_dev_wm8731 = {
 	.set_bias_level		= wm8731_set_bias_level,
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-09-30  2:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-30  1:45 [PATCH] ASoC: wm8731: Fix a unused function gcc warning zhong jiang
2018-09-30  2:17 ` Joe Perches
2018-09-30  2:32   ` zhong jiang
2018-09-30  2:25 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).