Skip to contentSkip to conversation

ALSA: hda/sigmatel: Fix unused variable warning for beep power change

PATCH New Takashi Iwai 1 participant 1 message Sep 5, 2022 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/sigmatel: Fix unused variable warning for beep power change

The newly added stac_check_power_status() caused a compile warning when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it.

Fixes 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabled")
---
 sound/pci/hda/patch_sigmatel.c | 2 ++
 1 file changed, 2 insertions(+)
sound/pci/hda/patch_sigmatel.c +2 -0
index 066bfccd2587..7f340f18599c 100644
@@ -4447,7 +4447,9 @@ static int stac_suspend(struct hda_codec *codec)
 
 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid)
 {
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
 	struct sigmatel_spec *spec = codec->spec;
+#endif
 	int ret = snd_hda_gen_check_power_status(codec, nid);
 
 #ifdef CONFIG_SND_HDA_INPUT_BEEP
Signature · 1 line
2.35.3