From 910f5d202ce39cc78de1bbb679285a3167de9fb2 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 23 Mar 2006 03:00:39 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/ad1889.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sound/oss/ad1889.c') diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c index a0d73f34310..54dabf86280 100644 --- a/sound/oss/ad1889.c +++ b/sound/oss/ad1889.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -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; } -- cgit v1.2.3-70-g09d2