]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: sonicvibes: Use str_on_off() helper in snd_sonicvibes_proc_read()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 10 Dec 2024 17:24:26 +0000 (18:24 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 11 Dec 2024 13:24:32 +0000 (14:24 +0100)
Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20241210172428.139643-2-thorsten.blum@linux.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/sonicvibes.c

index f91cbf6eeca0f6ef151760ccde8b360d6aed8041..e510715a6c9570571f8f365b30f7b4dc436ddc0b 100644 (file)
@@ -1135,9 +1135,9 @@ static void snd_sonicvibes_proc_read(struct snd_info_entry *entry,
                    tmp == 0x00 ? "on-board ROM" :
                    tmp == 0x01 ? "PCI bus" : "on-board ROM + PCI bus");
        tmp = sonic->mpu_switch;
-       snd_iprintf(buffer, "Onboard synth    : %s\n", tmp & 0x01 ? "on" : "off");
-       snd_iprintf(buffer, "Ext. Rx to synth : %s\n", tmp & 0x02 ? "on" : "off");
-       snd_iprintf(buffer, "MIDI to ext. Tx  : %s\n", tmp & 0x04 ? "on" : "off");
+       snd_iprintf(buffer, "Onboard synth    : %s\n", str_on_off(tmp & 0x01));
+       snd_iprintf(buffer, "Ext. Rx to synth : %s\n", str_on_off(tmp & 0x02));
+       snd_iprintf(buffer, "MIDI to ext. Tx  : %s\n", str_on_off(tmp & 0x04));
 }
 
 static void snd_sonicvibes_proc_init(struct sonicvibes *sonic)