summaryrefslogtreecommitdiffstats
path: root/sound/oss/aci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/aci.c')
-rw-r--r--sound/oss/aci.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/oss/aci.c b/sound/oss/aci.c
index 3928c28..3bfac37 100644
--- a/sound/oss/aci.c
+++ b/sound/oss/aci.c
@@ -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) ?
OpenPOWER on IntegriCloud