Commit c93c0f1e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] initialise timers in sound/

The result of a timer audit in sound/*
parent ecb0c4f5
...@@ -849,6 +849,7 @@ static int snd_timer_register_system(void) ...@@ -849,6 +849,7 @@ static int snd_timer_register_system(void)
snd_timer_free(timer); snd_timer_free(timer);
return -ENOMEM; return -ENOMEM;
} }
init_timer(tlist);
tlist->function = snd_timer_s_function; tlist->function = snd_timer_s_function;
tlist->data = (unsigned long) timer; tlist->data = (unsigned long) timer;
timer->private_data = tlist; timer->private_data = tlist;
......
...@@ -343,6 +343,7 @@ static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream) ...@@ -343,6 +343,7 @@ static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream)
return -ENOMEM; return -ENOMEM;
} }
memset(runtime->dma_area, 0, runtime->dma_bytes); memset(runtime->dma_area, 0, runtime->dma_bytes);
init_timer(&dpcm->timer);
dpcm->timer.data = (unsigned long) dpcm; dpcm->timer.data = (unsigned long) dpcm;
dpcm->timer.function = snd_card_dummy_pcm_timer_function; dpcm->timer.function = snd_card_dummy_pcm_timer_function;
spin_lock_init(&dpcm->lock); spin_lock_init(&dpcm->lock);
......
...@@ -683,6 +683,7 @@ static mtpav_t *new_mtpav(void) ...@@ -683,6 +683,7 @@ static mtpav_t *new_mtpav(void)
if (ncrd != NULL) { if (ncrd != NULL) {
spin_lock_init(&ncrd->spinlock); spin_lock_init(&ncrd->spinlock);
init_timer(&ncrd->timer);
ncrd->card = NULL; ncrd->card = NULL;
ncrd->irq = -1; ncrd->irq = -1;
ncrd->share_irq = 0; ncrd->share_irq = 0;
......
...@@ -785,6 +785,7 @@ static int __init snd_uart16550_create(snd_card_t * card, ...@@ -785,6 +785,7 @@ static int __init snd_uart16550_create(snd_card_t * card,
uart->prev_in = 0; uart->prev_in = 0;
uart->rstatus = 0; uart->rstatus = 0;
memset(uart->prev_status, 0x80, sizeof(unsigned char) * SNDRV_SERIAL_MAX_OUTS); memset(uart->prev_status, 0x80, sizeof(unsigned char) * SNDRV_SERIAL_MAX_OUTS);
init_timer(&uart->buffer_timer);
uart->buffer_timer.function = snd_uart16550_buffer_timer; uart->buffer_timer.function = snd_uart16550_buffer_timer;
uart->buffer_timer.data = (unsigned long)uart; uart->buffer_timer.data = (unsigned long)uart;
uart->timer_running = 0; uart->timer_running = 0;
......
...@@ -1155,8 +1155,7 @@ static void awacs_nosound(unsigned long xx) ...@@ -1155,8 +1155,7 @@ static void awacs_nosound(unsigned long xx)
spin_unlock_irqrestore(&dmasound.lock, flags); spin_unlock_irqrestore(&dmasound.lock, flags);
} }
static struct timer_list beep_timer = { static struct timer_list beep_timer = TIMER_INITIALIZER(awacs_nosound, 0, 0);
function: awacs_nosound
}; };
/* we generate the beep with a single dbdma command that loops a buffer /* we generate the beep with a single dbdma command that loops a buffer
......
...@@ -50,9 +50,7 @@ static struct midi_parms parms[MAX_MIDI_DEV]; ...@@ -50,9 +50,7 @@ static struct midi_parms parms[MAX_MIDI_DEV];
static void midi_poll(unsigned long dummy); static void midi_poll(unsigned long dummy);
static struct timer_list poll_timer = { static struct timer_list poll_timer = TIMER_INITIALIZER(midi_poll, 0, 0);
function: midi_poll
};
static volatile int open_devs = 0; static volatile int open_devs = 0;
static spinlock_t lock=SPIN_LOCK_UNLOCKED; static spinlock_t lock=SPIN_LOCK_UNLOCKED;
......
...@@ -697,7 +697,7 @@ static void do_sequencer_timer(unsigned long dummy) ...@@ -697,7 +697,7 @@ static void do_sequencer_timer(unsigned long dummy)
static struct timer_list seq_timer = static struct timer_list seq_timer =
{function: do_sequencer_timer}; TIMER_INITIALIZER(do_sequencer_timer, 0, 0);
void request_sound_timer(int count) void request_sound_timer(int count)
{ {
......
...@@ -29,8 +29,7 @@ static unsigned long prev_event_time; ...@@ -29,8 +29,7 @@ static unsigned long prev_event_time;
static void poll_def_tmr(unsigned long dummy); static void poll_def_tmr(unsigned long dummy);
static spinlock_t lock=SPIN_LOCK_UNLOCKED; static spinlock_t lock=SPIN_LOCK_UNLOCKED;
static struct timer_list def_tmr = static struct timer_list def_tmr = TIMER_INITIALIZER(poll_def_tmr, 0, 0);
{function: poll_def_tmr};
static unsigned long static unsigned long
tmr2ticks(int tmr_value) tmr2ticks(int tmr_value)
......
...@@ -77,9 +77,8 @@ static void (*midi_input_intr) (int dev, unsigned char data); ...@@ -77,9 +77,8 @@ static void (*midi_input_intr) (int dev, unsigned char data);
static void poll_uart6850(unsigned long dummy); static void poll_uart6850(unsigned long dummy);
static struct timer_list uart6850_timer = { static struct timer_list uart6850_timer =
function: poll_uart6850 TIMER_INITIALIZER(poll_uart6850, 0, 0);
};
static void uart6850_input_loop(void) static void uart6850_input_loop(void)
{ {
......
...@@ -949,6 +949,7 @@ static void snd_hdsp_midi_output_trigger(snd_rawmidi_substream_t * substream, in ...@@ -949,6 +949,7 @@ static void snd_hdsp_midi_output_trigger(snd_rawmidi_substream_t * substream, in
spin_lock_irqsave (&hmidi->lock, flags); spin_lock_irqsave (&hmidi->lock, flags);
if (up) { if (up) {
if (!hmidi->istimer) { if (!hmidi->istimer) {
init_timer(&hmidi->timer);
hmidi->timer.function = snd_hdsp_midi_output_timer; hmidi->timer.function = snd_hdsp_midi_output_timer;
hmidi->timer.data = (unsigned long) hmidi; hmidi->timer.data = (unsigned long) hmidi;
hmidi->timer.expires = 1 + jiffies; hmidi->timer.expires = 1 + jiffies;
......
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