Commit a0f70af7 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent b3344ddb
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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 */
+0 −6
Original line number Diff line number Diff line
@@ -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)
{
+2 −2
Original line number Diff line number Diff line
@@ -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);
	}
}