diff options
Diffstat (limited to 'sound/oss/ad1889.c')
-rw-r--r-- | sound/oss/ad1889.c | 7 |
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 @@ | |||
38 | #include <linux/ac97_codec.h> | 38 | #include <linux/ac97_codec.h> |
39 | #include <linux/sound.h> | 39 | #include <linux/sound.h> |
40 | #include <linux/interrupt.h> | 40 | #include <linux/interrupt.h> |
41 | #include <linux/mutex.h> | ||
41 | 42 | ||
42 | #include <asm/delay.h> | 43 | #include <asm/delay.h> |
43 | #include <asm/io.h> | 44 | #include <asm/io.h> |
@@ -238,7 +239,7 @@ static ad1889_dev_t *ad1889_alloc_dev(struct pci_dev *pci) | |||
238 | 239 | ||
239 | for (i = 0; i < AD_MAX_STATES; i++) { | 240 | for (i = 0; i < AD_MAX_STATES; i++) { |
240 | dev->state[i].card = dev; | 241 | dev->state[i].card = dev; |
241 | init_MUTEX(&dev->state[i].sem); | 242 | mutex_init(&dev->state[i].mutex); |
242 | init_waitqueue_head(&dev->state[i].dmabuf.wait); | 243 | init_waitqueue_head(&dev->state[i].dmabuf.wait); |
243 | } | 244 | } |
244 | 245 | ||
@@ -461,7 +462,7 @@ static ssize_t ad1889_write(struct file *file, const char __user *buffer, size_t | |||
461 | ssize_t ret = 0; | 462 | ssize_t ret = 0; |
462 | DECLARE_WAITQUEUE(wait, current); | 463 | DECLARE_WAITQUEUE(wait, current); |
463 | 464 | ||
464 | down(&state->sem); | 465 | mutex_lock(&state->mutex); |
465 | #if 0 | 466 | #if 0 |
466 | if (dmabuf->mapped) { | 467 | if (dmabuf->mapped) { |
467 | ret = -ENXIO; | 468 | ret = -ENXIO; |
@@ -546,7 +547,7 @@ static ssize_t ad1889_write(struct file *file, const char __user *buffer, size_t | |||
546 | err2: | 547 | err2: |
547 | remove_wait_queue(&state->dmabuf.wait, &wait); | 548 | remove_wait_queue(&state->dmabuf.wait, &wait); |
548 | err1: | 549 | err1: |
549 | up(&state->sem); | 550 | mutex_unlock(&state->mutex); |
550 | return ret; | 551 | return ret; |
551 | } | 552 | } |
552 | 553 | ||