From: Takashi Iwai Date: Tue, 7 Jan 2025 15:56:36 +0000 (+0100) Subject: ALSA: seq: oss: Simplify with str_enabled_disabled() X-Git-Tag: v6.14-rc1~111^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0f70af79d16cc3c630d66eb33cd8643399f312b;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h index c0b1cce127a33..6163a00bc8de1 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 e0733efba027b..e6d7d83ed0e77 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 02a90c960992e..9de47e098b291 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); } }