aboutsummaryrefslogtreecommitdiffstats
path: root/sound/synth/emux
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-01-19 05:41:13 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-19 05:41:13 -0500
commitabd083526af3a8a1610e884c8e619925c3d663e6 (patch)
tree4a5102f0116722c05eb169e36c099b104c351bfb /sound/synth/emux
parentda1a39242a946b34cf16a0119a7a3b852b17fef5 (diff)
ALSA: emux: 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/synth/emux')
-rw-r--r--sound/synth/emux/emux.c4
-rw-r--r--sound/synth/emux/emux_synth.c6
2 files changed, 3 insertions, 7 deletions
diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c
index f27a1c85f81b..49195325fdf6 100644
--- a/sound/synth/emux/emux.c
+++ b/sound/synth/emux/emux.c
@@ -53,9 +53,7 @@ int snd_emux_new(struct snd_emux **remu)
53 emu->max_voices = 0; 53 emu->max_voices = 0;
54 emu->use_time = 0; 54 emu->use_time = 0;
55 55
56 init_timer(&emu->tlist); 56 setup_timer(&emu->tlist, snd_emux_timer_callback, (unsigned long)emu);
57 emu->tlist.function = snd_emux_timer_callback;
58 emu->tlist.data = (unsigned long)emu;
59 emu->timer_active = 0; 57 emu->timer_active = 0;
60 58
61 *remu = emu; 59 *remu = emu;
diff --git a/sound/synth/emux/emux_synth.c b/sound/synth/emux/emux_synth.c
index 9a38de459acb..599551b5af44 100644
--- a/sound/synth/emux/emux_synth.c
+++ b/sound/synth/emux/emux_synth.c
@@ -186,8 +186,7 @@ snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
186 */ 186 */
187 vp->state = SNDRV_EMUX_ST_PENDING; 187 vp->state = SNDRV_EMUX_ST_PENDING;
188 if (! emu->timer_active) { 188 if (! emu->timer_active) {
189 emu->tlist.expires = jiffies + 1; 189 mod_timer(&emu->tlist, jiffies + 1);
190 add_timer(&emu->tlist);
191 emu->timer_active = 1; 190 emu->timer_active = 1;
192 } 191 }
193 } else 192 } else
@@ -223,8 +222,7 @@ void snd_emux_timer_callback(unsigned long data)
223 } 222 }
224 } 223 }
225 if (do_again) { 224 if (do_again) {
226 emu->tlist.expires = jiffies + 1; 225 mod_timer(&emu->tlist, jiffies + 1);
227 add_timer(&emu->tlist);
228 emu->timer_active = 1; 226 emu->timer_active = 1;
229 } else 227 } else
230 emu->timer_active = 0; 228 emu->timer_active = 0;