[PATCH] sem2mutex: sound/oss/
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: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
82d4dc5adb
commit
910f5d202c
@@ -56,7 +56,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/slab.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include "sound_config.h"
|
||||
@@ -79,7 +80,7 @@ static int aci_micpreamp=3; /* microphone preamp-level that can't be *
|
||||
* checked with ACI versions prior to 0xb0 */
|
||||
|
||||
static int mixer_device;
|
||||
static struct semaphore aci_sem;
|
||||
static struct mutex aci_mutex;
|
||||
|
||||
#ifdef MODULE
|
||||
static int reset;
|
||||
@@ -212,7 +213,7 @@ int aci_rw_cmd(int write1, int write2, int write3)
|
||||
int write[] = {write1, write2, write3};
|
||||
int read = -EINTR, i;
|
||||
|
||||
if (down_interruptible(&aci_sem))
|
||||
if (mutex_lock_interruptible(&aci_mutex))
|
||||
goto out;
|
||||
|
||||
for (i=0; i<3; i++) {
|
||||
@@ -227,7 +228,7 @@ int aci_rw_cmd(int write1, int write2, int write3)
|
||||
}
|
||||
|
||||
read = aci_rawread();
|
||||
out_up: up(&aci_sem);
|
||||
out_up: mutex_unlock(&aci_mutex);
|
||||
out: return read;
|
||||
}
|
||||
|
||||
@@ -603,7 +604,7 @@ static int __init attach_aci(void)
|
||||
char *boardname;
|
||||
int i, rc = -EBUSY;
|
||||
|
||||
init_MUTEX(&aci_sem);
|
||||
mutex_init(&aci_mutex);
|
||||
|
||||
outb(0xE3, 0xf8f); /* Write MAD16 password */
|
||||
aci_port = (inb(0xf90) & 0x10) ?
|
||||
|
Reference in New Issue
Block a user