]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: sb: Use str_enabled_disabled() helper in info_read()
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 9 Jan 2025 23:05:19 +0000 (00:05 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 10 Jan 2025 08:11:48 +0000 (09:11 +0100)
Remove hard-coded strings by using the str_enabled_disabled() helper
function.

Suggested-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20250109230521.237162-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/isa/sb/sb16_csp.c

index 071ba85f76bb83f8bc1f5d06ed60e4e9baecf12b..7034072c80d415071f5e46272ddfaa635225eaa4 100644 (file)
@@ -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,