Commit 8b7547f9 authored by Ingo Molnar's avatar Ingo Molnar Committed by Jaroslav Kysela
Browse files

[ALSA] semaphore -> mutex (ISA 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 ef9f0a42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ struct snd_ad1848 {
#endif

	spinlock_t reg_lock;
	struct semaphore open_mutex;
	struct mutex open_mutex;
};

/* exported functions */
+2 −2
Original line number Diff line number Diff line
@@ -248,8 +248,8 @@ struct snd_cs4231 {
	unsigned int c_dma_size;

	spinlock_t reg_lock;
	struct semaphore mce_mutex;
	struct semaphore open_mutex;
	struct mutex mce_mutex;
	struct mutex open_mutex;

	int (*rate_constraint) (struct snd_pcm_runtime *runtime);
	void (*set_playback_format) (struct snd_cs4231 *chip, struct snd_pcm_hw_params *hw_params, unsigned char pdfr);
+3 −3
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ struct snd_gf1_mem {
	struct snd_gf1_bank_info banks_16[4];
	struct snd_gf1_mem_block *first;
	struct snd_gf1_mem_block *last;
	struct semaphore memory_mutex;
	struct mutex memory_mutex;
};

struct snd_gf1_dma_block {
@@ -467,8 +467,8 @@ struct snd_gus_card {
	spinlock_t dma_lock;
	spinlock_t pcm_volume_level_lock;
	spinlock_t uart_cmd_lock;
	struct semaphore dma_mutex;
	struct semaphore register_mutex;
	struct mutex dma_mutex;
	struct mutex register_mutex;
};

/* I/O functions for GF1/InterWave chip - gus_io.c */
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ struct snd_sb_csp {
	struct snd_kcontrol *qsound_switch;
	struct snd_kcontrol *qsound_space;

	struct semaphore access_mutex;	/* locking */
	struct mutex access_mutex;	/* locking */
};

int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep);
+7 −7
Original line number Diff line number Diff line
@@ -387,9 +387,9 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode)
{
	unsigned long flags;

	down(&chip->open_mutex);
	mutex_lock(&chip->open_mutex);
	if (chip->mode & AD1848_MODE_OPEN) {
		up(&chip->open_mutex);
		mutex_unlock(&chip->open_mutex);
		return -EAGAIN;
	}
	snd_ad1848_mce_down(chip);
@@ -432,7 +432,7 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode)
	spin_unlock_irqrestore(&chip->reg_lock, flags);

	chip->mode = mode;
	up(&chip->open_mutex);
	mutex_unlock(&chip->open_mutex);

	return 0;
}
@@ -441,9 +441,9 @@ static void snd_ad1848_close(struct snd_ad1848 *chip)
{
	unsigned long flags;

	down(&chip->open_mutex);
	mutex_lock(&chip->open_mutex);
	if (!chip->mode) {
		up(&chip->open_mutex);
		mutex_unlock(&chip->open_mutex);
		return;
	}
	/* disable IRQ */
@@ -471,7 +471,7 @@ static void snd_ad1848_close(struct snd_ad1848 *chip)
	spin_unlock_irqrestore(&chip->reg_lock, flags);

	chip->mode = 0;
	up(&chip->open_mutex);
	mutex_unlock(&chip->open_mutex);
}

/*
@@ -889,7 +889,7 @@ int snd_ad1848_create(struct snd_card *card,
	if (chip == NULL)
		return -ENOMEM;
	spin_lock_init(&chip->reg_lock);
	init_MUTEX(&chip->open_mutex);
	mutex_init(&chip->open_mutex);
	chip->card = card;
	chip->port = port;
	chip->irq = -1;
Loading