Commit e0ae9de8 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: sound

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bbe9df08
......@@ -45,7 +45,7 @@
#include "../sound_config.h"
#endif
static spinlock_t midi_spinlock __attribute((unused)) = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(midi_spinlock __attribute((unused)));
static void init_midi_hdr(struct midi_hdr *midihdr)
{
......
......@@ -139,7 +139,7 @@ static int pcm_current_block;
static unsigned long pcm_current_buf;
static int pcm_current_count;
static int pcm_current_intrflag;
spinlock_t gus_lock=SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(gus_lock);
extern int *gus_osp;
......
......@@ -53,7 +53,7 @@
static int mad16_conf;
static int mad16_cdsel;
static struct gameport gameport;
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
#define C928 1
#define MOZART 2
......
......@@ -53,7 +53,7 @@ static void midi_poll(unsigned long dummy);
static struct timer_list poll_timer = TIMER_INITIALIZER(midi_poll, 0, 0);
static volatile int open_devs;
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
#define DATA_AVAIL(q) (q->len)
#define SPACE_AVAIL(q) (MAX_QUEUE_SIZE - q->len)
......
......@@ -36,7 +36,7 @@
static int sb_initialized;
#endif
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
static unsigned char opl3sa_read(int addr)
{
......
......@@ -832,7 +832,7 @@ static struct pnp_driver opl3sa2_driver = {
/* End of component functions */
#ifdef CONFIG_PM
static spinlock_t opl3sa2_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(opl3sa2_lock);
/* Power Management support functions */
static int opl3sa2_suspend(struct pm_dev *pdev, unsigned int pm_mode)
......
......@@ -40,7 +40,7 @@ int pas_translate_code = 0;
static int pas_intr_mask;
static int pas_irq;
static int pas_sb_base;
spinlock_t pas_lock=SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(pas_lock);
#ifndef CONFIG_PAS_JOYSTICK
static int joystick;
#else
......
......@@ -143,7 +143,7 @@ typedef struct pss_confdata {
static pss_confdata pss_data;
static pss_confdata *devc = &pss_data;
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
static int pss_initialized;
static int nonstandard_microcode;
......
......@@ -67,7 +67,7 @@ void *smw_free;
static int jazz16_base; /* Not detected */
static unsigned char jazz16_bits; /* I/O relocation bits */
static spinlock_t jazz16_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(jazz16_lock);
/*
* Logitech Soundman Wave specific initialization code
......
......@@ -28,7 +28,7 @@ static int pending_timer = -1; /* For timer change operation */
extern unsigned long seq_time;
static int obsolete_api_used;
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
/*
* Local counts for number of synth and MIDI devices. These are initialized
......
......@@ -27,7 +27,7 @@ static volatile unsigned long next_event_time;
static unsigned long prev_event_time;
static void poll_def_tmr(unsigned long dummy);
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
static struct timer_list def_tmr = TIMER_INITIALIZER(poll_def_tmr, 0, 0);
......
......@@ -72,7 +72,7 @@ static int uart6850_opened;
static int uart6850_irq;
static int uart6850_detected;
static int my_dev;
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
static void (*midi_input_intr) (int dev, unsigned char data);
static void poll_uart6850(unsigned long dummy);
......
......@@ -146,7 +146,7 @@ typedef struct wavnc_port_info {
static int nr_waveartist_devs;
static wavnc_info adev_info[MAX_AUDIO_DEV];
static spinlock_t waveartist_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(waveartist_lock);
#ifndef CONFIG_ARCH_NETWINDER
#define machine_is_netwinder() 0
......
......@@ -277,7 +277,7 @@ struct wf_config {
wait_queue_head_t interrupt_sleeper;
} dev;
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
static int detect_wffx(void);
static int wffx_ioctl (wavefront_fx_info *);
static int wffx_init (void);
......
......@@ -81,7 +81,7 @@ static struct wf_mpu_config *phys_dev = &devs[0];
static struct wf_mpu_config *virt_dev = &devs[1];
static void start_uart_mode (void);
static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(lock);
#define OUTPUT_READY 0x40
#define INPUT_AVAIL 0x80
......
......@@ -99,7 +99,7 @@ static void ymfpci_disable_dsp(ymfpci_t *unit);
static void ymfpci_download_image(ymfpci_t *codec);
static void ymf_memload(ymfpci_t *unit);
static spinlock_t ymf_devs_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(ymf_devs_lock);
static LIST_HEAD(ymf_devs);
/*
......
......@@ -146,7 +146,7 @@ static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit
* This lock guards the sound loader list.
*/
static spinlock_t sound_loader_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(sound_loader_lock);
/*
* Allocate the controlling structure and add it to the sound driver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment