Skip to contentSkip to conversation

ASoC: tas2552: Fix compilation warning for !PM_RUNTIME

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

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

PATCH 1/1 ASoC: tas2552: Fix compilation warning for !PM_RUNTIME

From: Thierry Reding <[email protected]>

The tas2552_sw_shutdown() function is only used by runtime suspend support, so only build it when necessary.

---
 sound/soc/codecs/tas2552.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/tas2552.c +2 -0
index 1ed57a7e57b6..f039dc825971 100644
@@ -115,6 +115,7 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = {
 	{"ClassD", NULL, "PLL"},
 };
 
+#ifdef CONFIG_PM_RUNTIME
 static void tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown)
 {
 	u8 cfg1_reg;
@@ -127,6 +128,7 @@ static void tas2552_sw_shutdown(struct tas2552_data *tas_data, int sw_shutdown)
 	snd_soc_update_bits(tas_data->codec, TAS2552_CFG_1,
 						 TAS2552_SWS_MASK, cfg1_reg);
 }
+#endif
 
 static int tas2552_hw_params(struct snd_pcm_substream *substream,
 			     struct snd_pcm_hw_params *params,
Signature · 1 line
2.1.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The tas2552_sw_shutdown() function is only used by runtime suspend support, so only build it when necessary.

Applied, thanks.