diff options
Diffstat (limited to 'sound/oss/emu10k1/midi.c')
-rw-r--r-- | sound/oss/emu10k1/midi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index b40b5f97aace..959a96794dba 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c | |||
@@ -110,21 +110,21 @@ match: | |||
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | /* Wait for device to become free */ | 112 | /* Wait for device to become free */ |
113 | down(&card->open_sem); | 113 | mutex_lock(&card->open_sem); |
114 | while (card->open_mode & (file->f_mode << FMODE_MIDI_SHIFT)) { | 114 | while (card->open_mode & (file->f_mode << FMODE_MIDI_SHIFT)) { |
115 | if (file->f_flags & O_NONBLOCK) { | 115 | if (file->f_flags & O_NONBLOCK) { |
116 | up(&card->open_sem); | 116 | mutex_unlock(&card->open_sem); |
117 | return -EBUSY; | 117 | return -EBUSY; |
118 | } | 118 | } |
119 | 119 | ||
120 | up(&card->open_sem); | 120 | mutex_unlock(&card->open_sem); |
121 | interruptible_sleep_on(&card->open_wait); | 121 | interruptible_sleep_on(&card->open_wait); |
122 | 122 | ||
123 | if (signal_pending(current)) { | 123 | if (signal_pending(current)) { |
124 | return -ERESTARTSYS; | 124 | return -ERESTARTSYS; |
125 | } | 125 | } |
126 | 126 | ||
127 | down(&card->open_sem); | 127 | mutex_lock(&card->open_sem); |
128 | } | 128 | } |
129 | 129 | ||
130 | if ((midi_dev = (struct emu10k1_mididevice *) kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) | 130 | if ((midi_dev = (struct emu10k1_mididevice *) kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) |
@@ -183,7 +183,7 @@ match: | |||
183 | 183 | ||
184 | card->open_mode |= (file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE); | 184 | card->open_mode |= (file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE); |
185 | 185 | ||
186 | up(&card->open_sem); | 186 | mutex_unlock(&card->open_sem); |
187 | 187 | ||
188 | return nonseekable_open(inode, file); | 188 | return nonseekable_open(inode, file); |
189 | } | 189 | } |
@@ -234,9 +234,9 @@ static int emu10k1_midi_release(struct inode *inode, struct file *file) | |||
234 | 234 | ||
235 | kfree(midi_dev); | 235 | kfree(midi_dev); |
236 | 236 | ||
237 | down(&card->open_sem); | 237 | mutex_lock(&card->open_sem); |
238 | card->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE)); | 238 | card->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE)); |
239 | up(&card->open_sem); | 239 | mutex_unlock(&card->open_sem); |
240 | wake_up_interruptible(&card->open_wait); | 240 | wake_up_interruptible(&card->open_wait); |
241 | 241 | ||
242 | unlock_kernel(); | 242 | unlock_kernel(); |