diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /sound/oss/emu10k1/midi.c | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
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(); |
