/* change seq capability flags to file mode flags  */
int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev)
/* change seq capability flags to file mode flags  */
int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev)
{
	struct seq_oss_midi *mdev;
	int mode;
	if ((mdev = get_mididev(dp, dev)) == NULL)
		return 0;
	mode = 0;
	if (mdev->opened & PERM_WRITE)
		mode |= SNDRV_SEQ_OSS_FILE_WRITE;
	if (mdev->opened & PERM_READ)
		mode |= SNDRV_SEQ_OSS_FILE_READ;
	snd_use_lock_free(&mdev->use_lock);
	return mode;
}