diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:29:55 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:32:28 -0500 |
commit | b843ce7425e6c7e5daa731f755373298499c22d4 (patch) | |
tree | 9b980f914497316e681f79725bd91beb432e7336 /sound/isa | |
parent | f05b4127730f16641de8cc39cd79b30120d37b51 (diff) |
ALSA: wavefront: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/wavefront/wavefront_midi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c index 7dc991682297..b8009cbcd34e 100644 --- a/sound/isa/wavefront/wavefront_midi.c +++ b/sound/isa/wavefront/wavefront_midi.c | |||
@@ -356,8 +356,7 @@ static void snd_wavefront_midi_output_timer(unsigned long data) | |||
356 | unsigned long flags; | 356 | unsigned long flags; |
357 | 357 | ||
358 | spin_lock_irqsave (&midi->virtual, flags); | 358 | spin_lock_irqsave (&midi->virtual, flags); |
359 | midi->timer.expires = 1 + jiffies; | 359 | mod_timer(&midi->timer, 1 + jiffies); |
360 | add_timer(&midi->timer); | ||
361 | spin_unlock_irqrestore (&midi->virtual, flags); | 360 | spin_unlock_irqrestore (&midi->virtual, flags); |
362 | snd_wavefront_midi_output_write(card); | 361 | snd_wavefront_midi_output_write(card); |
363 | } | 362 | } |
@@ -384,11 +383,10 @@ static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *subs | |||
384 | if (up) { | 383 | if (up) { |
385 | if ((midi->mode[mpu] & MPU401_MODE_OUTPUT_TRIGGER) == 0) { | 384 | if ((midi->mode[mpu] & MPU401_MODE_OUTPUT_TRIGGER) == 0) { |
386 | if (!midi->istimer) { | 385 | if (!midi->istimer) { |
387 | init_timer(&midi->timer); | 386 | setup_timer(&midi->timer, |
388 | midi->timer.function = snd_wavefront_midi_output_timer; | 387 | snd_wavefront_midi_output_timer, |
389 | midi->timer.data = (unsigned long) substream->rmidi->card->private_data; | 388 | (unsigned long) substream->rmidi->card->private_data); |
390 | midi->timer.expires = 1 + jiffies; | 389 | mod_timer(&midi->timer, 1 + jiffies); |
391 | add_timer(&midi->timer); | ||
392 | } | 390 | } |
393 | midi->istimer++; | 391 | midi->istimer++; |
394 | midi->mode[mpu] |= MPU401_MODE_OUTPUT_TRIGGER; | 392 | midi->mode[mpu] |= MPU401_MODE_OUTPUT_TRIGGER; |