summaryrefslogtreecommitdiff
path: root/sound/isa/sb/sb8_midi.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-19 11:29:42 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-19 11:32:28 +0100
commitf05b4127730f16641de8cc39cd79b30120d37b51 (patch)
tree608b5d183e74245a4b40081274e2a9ee51370013 /sound/isa/sb/sb8_midi.c
parent867a0e057f69a06e032f779efd4325ef632084af (diff)
ALSA: sb: 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/sb/sb8_midi.c')
-rw-r--r--sound/isa/sb/sb8_midi.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c
index ffc71f0267df..925ea45b3d97 100644
--- a/sound/isa/sb/sb8_midi.c
+++ b/sound/isa/sb/sb8_midi.c
@@ -216,8 +216,7 @@ static void snd_sb8dsp_midi_output_timer(unsigned long data)
unsigned long flags;
spin_lock_irqsave(&chip->open_lock, flags);
- chip->midi_timer.expires = 1 + jiffies;
- add_timer(&chip->midi_timer);
+ mod_timer(&chip->midi_timer, 1 + jiffies);
spin_unlock_irqrestore(&chip->open_lock, flags);
snd_sb8dsp_midi_output_write(substream);
}
@@ -231,11 +230,10 @@ static void snd_sb8dsp_midi_output_trigger(struct snd_rawmidi_substream *substre
spin_lock_irqsave(&chip->open_lock, flags);
if (up) {
if (!(chip->open & SB_OPEN_MIDI_OUTPUT_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;
- add_timer(&chip->midi_timer);
+ setup_timer(&chip->midi_timer,
+ snd_sb8dsp_midi_output_timer,
+ (unsigned long) substream);
+ mod_timer(&chip->midi_timer, 1 + jiffies);
chip->open |= SB_OPEN_MIDI_OUTPUT_TRIGGER;
}
} else {