]> www.infradead.org Git - users/hch/misc.git/commitdiff
ALSA: firewire: Simplify with str_on_off()
authorTakashi Iwai <tiwai@suse.de>
Tue, 7 Jan 2025 15:56:35 +0000 (16:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Jan 2025 06:58:39 +0000 (07:58 +0100)
Use the standard helper str_on_off() to simplify the code.
Only code refactoring, no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://patch.msgid.link/20250107155641.4435-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/fireface/ff-protocol-former.c

index efd59e9d99355e02d2d41171e2715d2fea01af5d..0907d0a2296f65995f4d8630a9e177b94e7bcf1b 100644 (file)
@@ -135,13 +135,13 @@ static void dump_clock_config(struct snd_ff *ff, struct snd_info_buffer *buffer)
 
        snd_iprintf(buffer, "Output S/PDIF format: %s (Emphasis: %s)\n",
                    (data & 0x00000020) ? "Professional" : "Consumer",
-                   (data & 0x00000040) ? "on" : "off");
+                   str_on_off(data & 0x00000040));
 
        snd_iprintf(buffer, "Optical output interface format: %s\n",
                    (data & 0x00000100) ? "S/PDIF" : "ADAT");
 
        snd_iprintf(buffer, "Word output single speed: %s\n",
-                   (data & 0x00002000) ? "on" : "off");
+                   str_on_off(data & 0x00002000));
 
        snd_iprintf(buffer, "S/PDIF input interface: %s\n",
                    (data & 0x00000200) ? "Optical" : "Coaxial");