Skip to contentSkip to conversation

ALSA: AC97: Use str_on_off() helper in snd_ac97_proc_read_main()

PATCH In review Thorsten Blum 2 participants 2 messages Dec 28, 2024 – Dec 29, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: AC97: Use str_on_off() helper in snd_ac97_proc_read_main()

Remove hard-coded strings by using the str_on_off() helper function.

---
 sound/pci/ac97/ac97_proc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/pci/ac97/ac97_proc.c +4 -4
index 5426f7bc9884..518834964b7b 100644
@@ -161,12 +161,12 @@ static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffe
 		    "Mic select       : %s\n"
 		    "ADC/DAC loopback : %s\n",
 		    val & 0x8000 ? "post" : "pre",
-		    val & 0x4000 ? "on" : "off",
-		    val & 0x2000 ? "on" : "off",
-		    val & 0x1000 ? "on" : "off",
+		    str_on_off(val & 0x4000),
+		    str_on_off(val & 0x2000),
+		    str_on_off(val & 0x1000),
 		    val & 0x0200 ? "Mic" : "MIX",
 		    val & 0x0100 ? "Mic2" : "Mic1",
-		    val & 0x0080 ? "on" : "off");
+		    str_on_off(val & 0x0080));
 	if (ac97->ext_id & AC97_EI_DRA)
 		snd_iprintf(buffer, "Double rate slots: %s\n",
 			    double_rate_slots[(val >> 10) & 3]);
Signature · 1 line
2.47.1