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

[PATCH] timers: sound/

Initialise dynamically allocated timers under sound/
parent d58cd53d
......@@ -314,6 +314,7 @@ static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream)
snd_magic_kfree(dpcm);
return -ENOMEM;
}
init_timer(&dpcm->timer);
dpcm->timer.data = (unsigned long) dpcm;
dpcm->timer.function = snd_card_dummy_pcm_timer_function;
spin_lock_init(&dpcm->lock);
......
......@@ -103,6 +103,7 @@ static void snd_mpu401_uart_add_timer (mpu401_t *mpu, int input)
spin_lock_irqsave (&mpu->timer_lock, flags);
if (mpu->timer_invoked == 0) {
init_timer(&mpu->timer);
mpu->timer.data = (unsigned long)mpu;
mpu->timer.function = snd_mpu401_uart_timer;
mpu->timer.expires = 1 + jiffies;
......
......@@ -424,6 +424,7 @@ static void snd_mtpav_output_timer(unsigned long data)
/* spinlock held! */
static void snd_mtpav_add_output_timer(mtpav_t *chip)
{
init_timer(&chip->timer);
chip->timer.function = snd_mtpav_output_timer;
chip->timer.data = (unsigned long) mtp_card;
chip->timer.expires = 1 + jiffies;
......
......@@ -267,6 +267,7 @@ static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
/* setup system timer */
memset(&opl3->tlist, 0, sizeof(opl3->tlist));
init_timer(&opl3->tlist);
opl3->tlist.function = snd_opl3_timer_func;
opl3->tlist.data = (unsigned long) opl3;
spin_lock_init(&opl3->sys_timer_lock);
......
......@@ -205,6 +205,7 @@ static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream,
spin_lock_irqsave(&chip->open_lock, flags);
if (up) {
if (!(chip->open & SB_OPEN_MIDI_TRIGGER)) {
init_timer(&chip->midi_timer);
chip->midi_timer.function = snd_sb8dsp_midi_output_timer;
chip->midi_timer.data = (unsigned long) substream;
chip->midi_timer.expires = 1 + jiffies;
......
......@@ -377,6 +377,7 @@ static void snd_wavefront_midi_output_trigger(snd_rawmidi_substream_t * substrea
if (up) {
if ((midi->mode[mpu] & MPU401_MODE_OUTPUT_TRIGGER) == 0) {
if (!midi->istimer) {
init_timer(&midi->timer);
midi->timer.function = snd_wavefront_midi_output_timer;
midi->timer.data = (unsigned long) substream->rmidi->card->private_data;
midi->timer.expires = 1 + jiffies;
......
......@@ -4148,6 +4148,7 @@ static int __init trident_probe(struct pci_dev *pci_dev, const struct pci_device
}
memset(card, 0, sizeof(*card));
init_timer(&card->timer);
card->iobase = iobase;
card->pci_dev = pci_dev;
card->pci_id = pci_id->device;
......
......@@ -53,6 +53,7 @@ int snd_emux_new(snd_emux_t **remu)
emu->max_voices = 0;
emu->use_time = 0;
init_timer(&emu->tlist);
emu->tlist.function = snd_emux_timer_callback;
emu->tlist.data = (unsigned long)emu;
emu->timer_active = 0;
......
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