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>
This commit is contained in:
Takashi Iwai
2025-01-07 16:56:36 +01:00
parent b3344ddb78
commit a0f70af79d
3 changed files with 2 additions and 12 deletions

View 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 */

View 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)
{

View 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);
}
}