summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 08:35:09 -0700
committerTakashi Iwai <tiwai@suse.de>2017-10-24 21:33:03 +0200
commit57e69e2f06e8fe4949c54e438c9faae0731e92f8 (patch)
treeb782eb28fdabbb6e2332f4ac58b6ab2bfa3f721e /sound
parent08352b200b203f8f9fa8a1c914acb58c7b10f907 (diff)
downloadop-kernel-dev-57e69e2f06e8fe4949c54e438c9faae0731e92f8.zip
op-kernel-dev-57e69e2f06e8fe4949c54e438c9faae0731e92f8.tar.gz
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: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/isa/wavefront/wavefront_midi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c
index 2aa05f3..556b147 100644
--- a/sound/isa/wavefront/wavefront_midi.c
+++ b/sound/isa/wavefront/wavefront_midi.c
@@ -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++;
OpenPOWER on IntegriCloud