[ALSA] semaphore -> mutex (driver part)
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
此提交包含在:
@@ -28,13 +28,13 @@ static int snd_opl4_mem_proc_open(struct snd_info_entry *entry,
|
||||
{
|
||||
struct snd_opl4 *opl4 = entry->private_data;
|
||||
|
||||
down(&opl4->access_mutex);
|
||||
mutex_lock(&opl4->access_mutex);
|
||||
if (opl4->memory_access) {
|
||||
up(&opl4->access_mutex);
|
||||
mutex_unlock(&opl4->access_mutex);
|
||||
return -EBUSY;
|
||||
}
|
||||
opl4->memory_access++;
|
||||
up(&opl4->access_mutex);
|
||||
mutex_unlock(&opl4->access_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ static int snd_opl4_mem_proc_release(struct snd_info_entry *entry,
|
||||
{
|
||||
struct snd_opl4 *opl4 = entry->private_data;
|
||||
|
||||
down(&opl4->access_mutex);
|
||||
mutex_lock(&opl4->access_mutex);
|
||||
opl4->memory_access--;
|
||||
up(&opl4->access_mutex);
|
||||
mutex_unlock(&opl4->access_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者