diff options
Diffstat (limited to 'sound/oss/aci.c')
-rw-r--r-- | sound/oss/aci.c | 11 |
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 | ||
81 | static int mixer_device; | 82 | static int mixer_device; |
82 | static struct semaphore aci_sem; | 83 | static struct mutex aci_mutex; |
83 | 84 | ||
84 | #ifdef MODULE | 85 | #ifdef MODULE |
85 | static int reset; | 86 | static 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(); |
230 | out_up: up(&aci_sem); | 231 | out_up: mutex_unlock(&aci_mutex); |
231 | out: return read; | 232 | out: 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) ? |