Skip to contentSkip to conversation

ALSA: sb: Use str_enabled_disabled() helper in info_read()

PATCH In review Thorsten Blum 2 participants 2 messages Jan 9, 2025 – Jan 10, 2025 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: sb: Use str_enabled_disabled() helper in info_read()

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

---
 sound/isa/sb/sb16_csp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/isa/sb/sb16_csp.c +3 -2
index 071ba85f76bb..7034072c80d4 100644
@@ -13,6 +13,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/module.h>
+#include <linux/string_choices.h>
 #include <sound/core.h>
 #include <sound/control.h>
 #include <sound/info.h>
@@ -1157,8 +1158,8 @@ static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buff
 				    ((p->acc_rates & SNDRV_SB_CSP_RATE_44100) ? "44100Hz" : ""));
 		}
 		if (p->mode == SNDRV_SB_CSP_MODE_QSOUND) {
-			snd_iprintf(buffer, "QSound decoder %sabled\n",
-				    p->q_enabled ? "en" : "dis");
+			snd_iprintf(buffer, "QSound decoder %s\n",
+				    str_enabled_disabled(p->q_enabled));
 		} else {
 			snd_iprintf(buffer, "PCM format ID: 0x%x (%s/%s) [%s/%s] [%s/%s]\n",
 				    p->acc_format,
Signature · 1 line
2.47.1