Commit 57e69e2f authored by Kees Cook's avatar Kees Cook Committed by Takashi Iwai

ALSA: wavefront: Convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 08352b20
......@@ -28,6 +28,7 @@ struct _snd_wavefront_midi {
struct snd_rawmidi_substream *substream_output[2];
struct snd_rawmidi_substream *substream_input[2];
struct timer_list timer;
snd_wavefront_card_t *timer_card;
spinlock_t open;
spinlock_t virtual; /* protects isvirtual */
};
......
......@@ -349,10 +349,10 @@ static void snd_wavefront_midi_input_trigger(struct snd_rawmidi_substream *subst
spin_unlock_irqrestore (&midi->virtual, flags);
}
static void snd_wavefront_midi_output_timer(unsigned long data)
static void snd_wavefront_midi_output_timer(struct timer_list *t)
{
snd_wavefront_card_t *card = (snd_wavefront_card_t *)data;
snd_wavefront_midi_t *midi = &card->wavefront.midi;
snd_wavefront_midi_t *midi = from_timer(midi, t, timer);
snd_wavefront_card_t *card = midi->timer_card;
unsigned long flags;
spin_lock_irqsave (&midi->virtual, flags);
......@@ -383,9 +383,9 @@ static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *subs
if (up) {
if ((midi->mode[mpu] & MPU401_MODE_OUTPUT_TRIGGER) == 0) {
if (!midi->istimer) {
setup_timer(&midi->timer,
timer_setup(&midi->timer,
snd_wavefront_midi_output_timer,
(unsigned long) substream->rmidi->card->private_data);
0);
mod_timer(&midi->timer, 1 + jiffies);
}
midi->istimer++;
......
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