diff options
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index f3d5de7b55ac..ce1956a5528d 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -2112,7 +2112,7 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) | |||
2112 | } | 2112 | } |
2113 | init_waitqueue_entry(&wait, current); | 2113 | init_waitqueue_entry(&wait, current); |
2114 | add_wait_queue(&pcm->open_wait, &wait); | 2114 | add_wait_queue(&pcm->open_wait, &wait); |
2115 | down(&pcm->open_mutex); | 2115 | mutex_lock(&pcm->open_mutex); |
2116 | while (1) { | 2116 | while (1) { |
2117 | err = snd_pcm_open_file(file, pcm, stream, &pcm_file); | 2117 | err = snd_pcm_open_file(file, pcm, stream, &pcm_file); |
2118 | if (err >= 0) | 2118 | if (err >= 0) |
@@ -2125,16 +2125,16 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) | |||
2125 | } else | 2125 | } else |
2126 | break; | 2126 | break; |
2127 | set_current_state(TASK_INTERRUPTIBLE); | 2127 | set_current_state(TASK_INTERRUPTIBLE); |
2128 | up(&pcm->open_mutex); | 2128 | mutex_unlock(&pcm->open_mutex); |
2129 | schedule(); | 2129 | schedule(); |
2130 | down(&pcm->open_mutex); | 2130 | mutex_lock(&pcm->open_mutex); |
2131 | if (signal_pending(current)) { | 2131 | if (signal_pending(current)) { |
2132 | err = -ERESTARTSYS; | 2132 | err = -ERESTARTSYS; |
2133 | break; | 2133 | break; |
2134 | } | 2134 | } |
2135 | } | 2135 | } |
2136 | remove_wait_queue(&pcm->open_wait, &wait); | 2136 | remove_wait_queue(&pcm->open_wait, &wait); |
2137 | up(&pcm->open_mutex); | 2137 | mutex_unlock(&pcm->open_mutex); |
2138 | if (err < 0) | 2138 | if (err < 0) |
2139 | goto __error; | 2139 | goto __error; |
2140 | return err; | 2140 | return err; |
@@ -2160,9 +2160,9 @@ static int snd_pcm_release(struct inode *inode, struct file *file) | |||
2160 | pcm = substream->pcm; | 2160 | pcm = substream->pcm; |
2161 | snd_pcm_drop(substream); | 2161 | snd_pcm_drop(substream); |
2162 | fasync_helper(-1, file, 0, &substream->runtime->fasync); | 2162 | fasync_helper(-1, file, 0, &substream->runtime->fasync); |
2163 | down(&pcm->open_mutex); | 2163 | mutex_lock(&pcm->open_mutex); |
2164 | snd_pcm_release_file(pcm_file); | 2164 | snd_pcm_release_file(pcm_file); |
2165 | up(&pcm->open_mutex); | 2165 | mutex_unlock(&pcm->open_mutex); |
2166 | wake_up(&pcm->open_wait); | 2166 | wake_up(&pcm->open_wait); |
2167 | module_put(pcm->card->module); | 2167 | module_put(pcm->card->module); |
2168 | snd_card_file_remove(pcm->card, file); | 2168 | snd_card_file_remove(pcm->card, file); |