Skip to contentSkip to conversation

ASoC: rt286: Fix compilation warning for !PM

PATCH Applied Thierry Reding 2 participants 2 messages Oct 2, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt286: Fix compilation warning for !PM

From: Thierry Reding <[email protected]>

The rt286_index_sync() function is only called in the resume path. If PM is disabled it becomes unused and shouldn't be built either.

---
 sound/soc/codecs/rt286.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/rt286.c +2 -0
index b86b426f159d..4aa555cbcca8 100644
@@ -269,6 +269,7 @@ static int rt286_hw_read(void *context, unsigned int reg, unsigned int *value)
 	return 0;
 }
 
+#ifdef CONFIG_PM
 static void rt286_index_sync(struct snd_soc_codec *codec)
 {
 	struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec);
@@ -279,6 +280,7 @@ static void rt286_index_sync(struct snd_soc_codec *codec)
 				  rt286->index_cache[i].def);
 	}
 }
+#endif
 
 static int rt286_support_power_controls[] = {
 	RT286_DAC_OUT1,
Signature · 1 line
2.1.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The rt286_index_sync() function is only called in the resume path. If PM is disabled it becomes unused and shouldn't be built either.

Applied, thanks.