Skip to content

Commit 1bc1965

Browse files
tobluxtiwai
authored andcommitted
ALSA: emu10k1: Use str_yes_no() helper
Remove hard-coded strings by using the str_yes_no() helper function. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250109223809.198582-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent b48f2f7 commit 1bc1965

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

sound/pci/emu10k1/emuproc.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include <linux/slab.h>
1313
#include <linux/init.h>
14+
#include <linux/string_choices.h>
1415
#include <sound/core.h>
1516
#include <sound/emu10k1.h>
1617
#include "p16v.h"
@@ -32,9 +33,9 @@ static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu,
3233
snd_iprintf(buffer, "\n%s\n", title);
3334

3435
if (status != 0xffffffff) {
35-
snd_iprintf(buffer, "Professional Mode : %s\n", (status & SPCS_PROFESSIONAL) ? "yes" : "no");
36-
snd_iprintf(buffer, "Not Audio Data : %s\n", (status & SPCS_NOTAUDIODATA) ? "yes" : "no");
37-
snd_iprintf(buffer, "Copyright : %s\n", (status & SPCS_COPYRIGHT) ? "yes" : "no");
36+
snd_iprintf(buffer, "Professional Mode : %s\n", str_yes_no(status & SPCS_PROFESSIONAL));
37+
snd_iprintf(buffer, "Not Audio Data : %s\n", str_yes_no(status & SPCS_NOTAUDIODATA));
38+
snd_iprintf(buffer, "Copyright : %s\n", str_yes_no(status & SPCS_COPYRIGHT));
3839
snd_iprintf(buffer, "Emphasis : %s\n", emphasis[(status & SPCS_EMPHASISMASK) >> 3]);
3940
snd_iprintf(buffer, "Mode : %i\n", (status & SPCS_MODEMASK) >> 6);
4041
snd_iprintf(buffer, "Category Code : 0x%x\n", (status & SPCS_CATEGORYCODEMASK) >> 8);

0 commit comments

Comments
 (0)