From f82945dff51ff7b33f69cb45a8342b936e966f7f Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 23 Mar 2006 03:00:47 -0800 Subject: [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 Signed-off-by: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/dmasound/dmasound_awacs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sound/oss/dmasound') diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 74f975676cc..a17375141c3 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c @@ -80,7 +80,7 @@ #include #include #include -#include +#include #ifdef CONFIG_ADB_CUDA #include #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 * -- cgit v1.2.3