]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ALSA: seq: oss: Simplify with str_enabled_disabled()
authorTakashi Iwai <tiwai@suse.de>
Tue, 7 Jan 2025 15:56:36 +0000 (16:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 7 Jan 2025 16:35:25 +0000 (17:35 +0100)
Use the standard helper str_enabled_disabled() to simplify the code.
Only code refactoring, no behavior change.

Link: https://patch.msgid.link/20250107155641.4435-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/oss/seq_oss_device.h
sound/core/seq/oss/seq_oss_init.c
sound/core/seq/oss/seq_oss_synth.c

index c0b1cce127a33c33a2d629fdb29f8c95cefe1ab0..6163a00bc8de127b2d0c5db7f60e926e5a2ae873 100644 (file)
@@ -156,8 +156,4 @@ snd_seq_oss_fill_addr(struct seq_oss_devinfo *dp, struct snd_seq_event *ev,
        ev->dest.port = dest_port;
 }
 
-
-/* misc. functions for proc interface */
-char *enabled_str(bool b);
-
 #endif /* __SEQ_OSS_DEVICE_H */
index e0733efba027be5ac35c0c29bb347bf76936d665..e6d7d83ed0e772adcd2de10931caab96d7f6ceed 100644 (file)
@@ -449,12 +449,6 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
 /*
  * misc. functions for proc interface
  */
-char *
-enabled_str(bool b)
-{
-       return b ? "enabled" : "disabled";
-}
-
 static const char *
 filemode_str(int val)
 {
index 02a90c960992ed6caf786079da81b42645b94b84..9de47e098b2910fa178ecbeddeb740d41630b964 100644 (file)
@@ -608,8 +608,8 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
                            rec->synth_type, rec->synth_subtype,
                            rec->nr_voices);
                snd_iprintf(buf, "  capabilities : ioctl %s / load_patch %s\n",
-                           enabled_str((long)rec->oper.ioctl),
-                           enabled_str((long)rec->oper.load_patch));
+                           str_enabled_disabled((long)rec->oper.ioctl),
+                           str_enabled_disabled((long)rec->oper.load_patch));
                snd_use_lock_free(&rec->use_lock);
        }
 }