Skip to contentSkip to conversation

ALSA: sonicvibes: Use str_on_off() helper in snd_sonicvibes_proc_read()

PATCH Applied Thorsten Blum 2 participants 2 messages Dec 10, 2024 – Dec 11, 2024 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: sonicvibes: Use str_on_off() helper in snd_sonicvibes_proc_read()

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

---
 sound/pci/sonicvibes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/pci/sonicvibes.c +3 -3
index f91cbf6eeca0..e510715a6c95 100644
@@ -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)
Signature · 1 line
2.47.1