From: Thorsten Blum Date: Tue, 10 Dec 2024 17:24:26 +0000 (+0100) Subject: ALSA: sonicvibes: Use str_on_off() helper in snd_sonicvibes_proc_read() X-Git-Tag: v6.14-rc1~111^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42d28736a5a4c3f499bb2d4b7fd84e334bdd5489;p=thirdparty%2Fkernel%2Flinux.git ALSA: sonicvibes: Use str_on_off() helper in snd_sonicvibes_proc_read() Remove hard-coded strings by using the str_on_off() helper function. Signed-off-by: Thorsten Blum Link: https://patch.msgid.link/20241210172428.139643-2-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index f91cbf6eeca0f..e510715a6c957 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c @@ -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)