Commit 1a60d4c5 authored by Ingo Molnar's avatar Ingo Molnar Committed by Jaroslav Kysela
Browse files

[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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f0283f45
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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;
	/* --- */
+1 −1
Original line number Diff line number Diff line
@@ -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);
Loading