summaryrefslogtreecommitdiffstats
path: root/sound/oss/dmasound
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-23 03:00:47 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 07:38:15 -0800
commitf82945dff51ff7b33f69cb45a8342b936e966f7f (patch)
treed550c4b48fd13574147d09b49b1706fcf3644dc3 /sound/oss/dmasound
parent6389a385114ae358693f213266de6468ea116c77 (diff)
downloadlinux-f82945dff51ff7b33f69cb45a8342b936e966f7f.tar.bz2
[PATCH] oss: semaphore to mutex conversion
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Extracted for OSS/Free changes from Ingo's original patches. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/dmasound')
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index 74f975676ccb..a17375141c3a 100644
--- a/sound/oss/dmasound/dmasound_awacs.c
+++ b/sound/oss/dmasound/dmasound_awacs.c
@@ -80,7 +80,7 @@
#include <linux/kmod.h>
#include <linux/interrupt.h>
#include <linux/input.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#ifdef CONFIG_ADB_CUDA
#include <linux/cuda.h>
#endif
@@ -130,7 +130,7 @@ static struct resource awacs_rsrc[3];
static char awacs_name[64];
static int awacs_revision;
static int awacs_sleeping;
-static DECLARE_MUTEX(dmasound_sem);
+static DEFINE_MUTEX(dmasound_mutex);
static int sound_device_id; /* exists after iMac revA */
static int hw_can_byteswap = 1 ; /* most pmac sound h/w can */
@@ -312,11 +312,11 @@ extern int daca_enter_sleep(void);
extern int daca_leave_sleep(void);
#define TRY_LOCK() \
- if ((rc = down_interruptible(&dmasound_sem)) != 0) \
+ if ((rc = mutex_lock_interruptible(&dmasound_mutex)) != 0) \
return rc;
-#define LOCK() down(&dmasound_sem);
+#define LOCK() mutex_lock(&dmasound_mutex);
-#define UNLOCK() up(&dmasound_sem);
+#define UNLOCK() mutex_unlock(&dmasound_mutex);
/* We use different versions that the ones provided in dmasound.h
*