summaryrefslogtreecommitdiffstats
path: root/sound/oss/ad1889.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-31 15:34:58 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-31 15:34:58 -0500
commit86579dd06deecfa6ac88d5e84e4d63c397cd6f6d (patch)
treeb4475d3ccde53015ad84a06e4e55e64591171b75 /sound/oss/ad1889.c
parent7ea9ea832212c4a755650f7c7cc1ff0b63292a41 (diff)
parenta0f067802576d4eb4c65d40b8ee7d6ea3c81dd61 (diff)
downloadlinux-stable-86579dd06deecfa6ac88d5e84e4d63c397cd6f6d.tar.gz
linux-stable-86579dd06deecfa6ac88d5e84e4d63c397cd6f6d.tar.bz2
linux-stable-86579dd06deecfa6ac88d5e84e4d63c397cd6f6d.zip
Merge branch 'master'
Diffstat (limited to 'sound/oss/ad1889.c')
-rw-r--r--sound/oss/ad1889.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c
index a0d73f343100..54dabf862802 100644
--- a/sound/oss/ad1889.c
+++ b/sound/oss/ad1889.c
@@ -38,6 +38,7 @@
#include <linux/ac97_codec.h>
#include <linux/sound.h>
#include <linux/interrupt.h>
+#include <linux/mutex.h>
#include <asm/delay.h>
#include <asm/io.h>
@@ -238,7 +239,7 @@ static ad1889_dev_t *ad1889_alloc_dev(struct pci_dev *pci)
for (i = 0; i < AD_MAX_STATES; i++) {
dev->state[i].card = dev;
- init_MUTEX(&dev->state[i].sem);
+ mutex_init(&dev->state[i].mutex);
init_waitqueue_head(&dev->state[i].dmabuf.wait);
}
@@ -461,7 +462,7 @@ static ssize_t ad1889_write(struct file *file, const char __user *buffer, size_t
ssize_t ret = 0;
DECLARE_WAITQUEUE(wait, current);
- down(&state->sem);
+ mutex_lock(&state->mutex);
#if 0
if (dmabuf->mapped) {
ret = -ENXIO;
@@ -546,7 +547,7 @@ static ssize_t ad1889_write(struct file *file, const char __user *buffer, size_t
err2:
remove_wait_queue(&state->dmabuf.wait, &wait);
err1:
- up(&state->sem);
+ mutex_unlock(&state->mutex);
return ret;
}