aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/aci.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-23 06:00:39 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:13 -0500
commit910f5d202ce39cc78de1bbb679285a3167de9fb2 (patch)
tree2c5b55c2b141aaf016c459beb397fc702c41b967 /sound/oss/aci.c
parent82d4dc5adb0055393248ad4ab8de392fac708a12 (diff)
[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>
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 3928c2802cc4..3bfac375dbdb 100644
--- a/sound/oss/aci.c
+++ b/sound/oss/aci.c
@@ -56,7 +56,8 @@
56#include <linux/module.h> 56#include <linux/module.h>
57#include <linux/proc_fs.h> 57#include <linux/proc_fs.h>
58#include <linux/slab.h> 58#include <linux/slab.h>
59#include <asm/semaphore.h> 59#include <linux/mutex.h>
60
60#include <asm/io.h> 61#include <asm/io.h>
61#include <asm/uaccess.h> 62#include <asm/uaccess.h>
62#include "sound_config.h" 63#include "sound_config.h"
@@ -79,7 +80,7 @@ static int aci_micpreamp=3; /* microphone preamp-level that can't be *
79 * checked with ACI versions prior to 0xb0 */ 80 * checked with ACI versions prior to 0xb0 */
80 81
81static int mixer_device; 82static int mixer_device;
82static struct semaphore aci_sem; 83static struct mutex aci_mutex;
83 84
84#ifdef MODULE 85#ifdef MODULE
85static int reset; 86static int reset;
@@ -212,7 +213,7 @@ int aci_rw_cmd(int write1, int write2, int write3)
212 int write[] = {write1, write2, write3}; 213 int write[] = {write1, write2, write3};
213 int read = -EINTR, i; 214 int read = -EINTR, i;
214 215
215 if (down_interruptible(&aci_sem)) 216 if (mutex_lock_interruptible(&aci_mutex))
216 goto out; 217 goto out;
217 218
218 for (i=0; i<3; i++) { 219 for (i=0; i<3; i++) {
@@ -227,7 +228,7 @@ int aci_rw_cmd(int write1, int write2, int write3)
227 } 228 }
228 229
229 read = aci_rawread(); 230 read = aci_rawread();
230out_up: up(&aci_sem); 231out_up: mutex_unlock(&aci_mutex);
231out: return read; 232out: return read;
232} 233}
233 234
@@ -603,7 +604,7 @@ static int __init attach_aci(void)
603 char *boardname; 604 char *boardname;
604 int i, rc = -EBUSY; 605 int i, rc = -EBUSY;
605 606
606 init_MUTEX(&aci_sem); 607 mutex_init(&aci_mutex);
607 608
608 outb(0xE3, 0xf8f); /* Write MAD16 password */ 609 outb(0xE3, 0xf8f); /* Write MAD16 password */
609 aci_port = (inb(0xf90) & 0x10) ? 610 aci_port = (inb(0xf90) & 0x10) ?