diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-01-07 16:56:36 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-01-07 17:35:25 +0100 |
commit | a0f70af79d16cc3c630d66eb33cd8643399f312b (patch) | |
tree | c0a0f020ff6b6d142c00ae716f232f4ebf5a8cdc | |
parent | b3344ddb78e16e629a397ab67fd20c9ec7662f75 (diff) |
ALSA: seq: oss: Simplify with str_enabled_disabled()
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>
-rw-r--r-- | sound/core/seq/oss/seq_oss_device.h | 4 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_init.c | 6 | ||||
-rw-r--r-- | sound/core/seq/oss/seq_oss_synth.c | 4 |
3 files changed, 2 insertions, 12 deletions
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h index c0b1cce127a3..6163a00bc8de 100644 --- a/sound/core/seq/oss/seq_oss_device.h +++ b/sound/core/seq/oss/seq_oss_device.h @@ -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 */ diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index e0733efba027..e6d7d83ed0e7 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -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) { diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c index 02a90c960992..9de47e098b29 100644 --- a/sound/core/seq/oss/seq_oss_synth.c +++ b/sound/core/seq/oss/seq_oss_synth.c @@ -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); } } |