summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 16:29:08 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:24:50 +0100
commit1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (patch)
treef03f8dfcd554f8ebbb295522dc46dfe4d110a484 /include
parentf0283f45a04d5cf31512e5e390a38504d97e7a97 (diff)
downloadop-kernel-dev-1a60d4c5a0c4028559585a74e48593b16e1ca9b2.zip
op-kernel-dev-1a60d4c5a0c4028559585a74e48593b16e1ca9b2.tar.gz
[ALSA] semaphore -> mutex (core part)
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 <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/sound/core.h8
-rw-r--r--include/sound/hwdep.h2
-rw-r--r--include/sound/info.h2
-rw-r--r--include/sound/mixer_oss.h2
-rw-r--r--include/sound/pcm.h2
-rw-r--r--include/sound/pcm_oss.h2
-rw-r--r--include/sound/rawmidi.h4
-rw-r--r--include/sound/seq_instr.h2
8 files changed, 12 insertions, 12 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 3093e3d..144bdc2 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -23,7 +23,7 @@
*/
#include <linux/sched.h> /* wake_up() */
-#include <asm/semaphore.h> /* struct semaphore */
+#include <linux/mutex.h> /* struct mutex */
#include <linux/rwsem.h> /* struct rw_semaphore */
#include <linux/workqueue.h> /* struct workqueue_struct */
#include <linux/pm.h> /* pm_message_t */
@@ -137,7 +137,7 @@ struct snd_card {
#ifdef CONFIG_PM
unsigned int power_state; /* power state */
- struct semaphore power_lock; /* power lock */
+ struct mutex power_lock; /* power lock */
wait_queue_head_t power_sleep;
#endif
@@ -150,12 +150,12 @@ struct snd_card {
#ifdef CONFIG_PM
static inline void snd_power_lock(struct snd_card *card)
{
- down(&card->power_lock);
+ mutex_lock(&card->power_lock);
}
static inline void snd_power_unlock(struct snd_card *card)
{
- up(&card->power_lock);
+ mutex_unlock(&card->power_lock);
}
static inline unsigned int snd_power_get_state(struct snd_card *card)
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
index c679e5b..94c387b 100644
--- a/include/sound/hwdep.h
+++ b/include/sound/hwdep.h
@@ -60,7 +60,7 @@ struct snd_hwdep {
void *private_data;
void (*private_free) (struct snd_hwdep *hwdep);
- struct semaphore open_mutex;
+ struct mutex open_mutex;
int used;
unsigned int dsp_loaded;
unsigned int exclusive: 1;
diff --git a/include/sound/info.h b/include/sound/info.h
index 8ea5c74..f23d838 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -84,7 +84,7 @@ struct snd_info_entry {
void *private_data;
void (*private_free)(struct snd_info_entry *entry);
struct proc_dir_entry *p;
- struct semaphore access;
+ struct mutex access;
};
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
diff --git a/include/sound/mixer_oss.h b/include/sound/mixer_oss.h
index ca5b482..197b9e3 100644
--- a/include/sound/mixer_oss.h
+++ b/include/sound/mixer_oss.h
@@ -61,7 +61,7 @@ struct snd_mixer_oss {
unsigned int active_index);
void *private_data_recsrc;
void (*private_free_recsrc)(struct snd_mixer_oss *mixer);
- struct semaphore reg_mutex;
+ struct mutex reg_mutex;
struct snd_info_entry *proc_entry;
int oss_dev_alloc;
/* --- */
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 314268a..15b8856 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -420,7 +420,7 @@ struct snd_pcm {
char id[64];
char name[80];
struct snd_pcm_str streams[2];
- struct semaphore open_mutex;
+ struct mutex open_mutex;
wait_queue_head_t open_wait;
void *private_data;
void (*private_free) (struct snd_pcm *pcm);
diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h
index d6ec886..bff0778e 100644
--- a/include/sound/pcm_oss.h
+++ b/include/sound/pcm_oss.h
@@ -75,7 +75,7 @@ struct snd_pcm_oss_substream {
struct snd_pcm_oss_stream {
struct snd_pcm_oss_setup *setup_list; /* setup list */
- struct semaphore setup_mutex;
+ struct mutex setup_mutex;
struct snd_info_entry *proc_entry;
};
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
index d19bddf..584e73d 100644
--- a/include/sound/rawmidi.h
+++ b/include/sound/rawmidi.h
@@ -26,7 +26,7 @@
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
#include "seq_device.h"
@@ -130,7 +130,7 @@ struct snd_rawmidi {
void *private_data;
void (*private_free) (struct snd_rawmidi *rmidi);
- struct semaphore open_mutex;
+ struct mutex open_mutex;
wait_queue_head_t open_wait;
struct snd_info_entry *dev;
diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h
index db764f0..f2db03b 100644
--- a/include/sound/seq_instr.h
+++ b/include/sound/seq_instr.h
@@ -64,7 +64,7 @@ struct snd_seq_kinstr_list {
spinlock_t lock;
spinlock_t ops_lock;
- struct semaphore ops_mutex;
+ struct mutex ops_mutex;
unsigned long ops_flags;
};
OpenPOWER on IntegriCloud