aboutsummaryrefslogtreecommitdiff
path: root/sound/oss/dmasound
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/dmasound')
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c12
-rw-r--r--sound/oss/dmasound/dmasound_core.c10
2 files changed, 10 insertions, 12 deletions
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index 74f975676cc..6ba8d6f45fe 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
@@ -88,8 +88,6 @@
#include <linux/pmu.h>
#endif
-#include <linux/i2c-dev.h>
-
#include <asm/uaccess.h>
#include <asm/prom.h>
#include <asm/machdep.h>
@@ -130,7 +128,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 +310,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
*
diff --git a/sound/oss/dmasound/dmasound_core.c b/sound/oss/dmasound/dmasound_core.c
index c9302a1e515..87bd3100aef 100644
--- a/sound/oss/dmasound/dmasound_core.c
+++ b/sound/oss/dmasound/dmasound_core.c
@@ -195,18 +195,18 @@
*/
int dmasound_catchRadius = 0;
-MODULE_PARM(dmasound_catchRadius, "i");
+module_param(dmasound_catchRadius, int, 0);
static unsigned int numWriteBufs = DEFAULT_N_BUFFERS;
-MODULE_PARM(numWriteBufs, "i");
+module_param(numWriteBufs, int, 0);
static unsigned int writeBufSize = DEFAULT_BUFF_SIZE ; /* in bytes */
-MODULE_PARM(writeBufSize, "i");
+module_param(writeBufSize, int, 0);
#ifdef HAS_RECORD
static unsigned int numReadBufs = DEFAULT_N_BUFFERS;
-MODULE_PARM(numReadBufs, "i");
+module_param(numReadBufs, int, 0);
static unsigned int readBufSize = DEFAULT_BUFF_SIZE; /* in bytes */
-MODULE_PARM(readBufSize, "i");
+module_param(readBufSize, int, 0);
#endif
MODULE_LICENSE("GPL");