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/aci.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sound/oss/aci.c') 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 @@ #include #include #include -#include +#include + #include #include #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) ? -- cgit v1.2.2