]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ALSA: emux: Convert timers to use timer_setup()
authorKees Cook <keescook@chromium.org>
Tue, 24 Oct 2017 15:34:40 +0000 (08:34 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 24 Oct 2017 19:01:33 +0000 (21:01 +0200)
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>
sound/synth/emux/emux.c
sound/synth/emux/emux_synth.c
sound/synth/emux/emux_voice.h

index b9981e8c002729e33a255bcb9a55e387d39ba22b..b840ff2dcfbb73c5958040c72fc42213db0e5960 100644 (file)
@@ -53,7 +53,7 @@ int snd_emux_new(struct snd_emux **remu)
        emu->max_voices = 0;
        emu->use_time = 0;
 
-       setup_timer(&emu->tlist, snd_emux_timer_callback, (unsigned long)emu);
+       timer_setup(&emu->tlist, snd_emux_timer_callback, 0);
        emu->timer_active = 0;
 
        *remu = emu;
index 599551b5af44cae35477cb010ae380d53009229c..9fa696b0dbde301f944d778be6d861e0dda14f91 100644 (file)
@@ -202,9 +202,9 @@ snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
  *
  * release the pending note-offs
  */
-void snd_emux_timer_callback(unsigned long data)
+void snd_emux_timer_callback(struct timer_list *t)
 {
-       struct snd_emux *emu = (struct snd_emux *) data;
+       struct snd_emux *emu = from_timer(emu, t, tlist);
        struct snd_emux_voice *vp;
        unsigned long flags;
        int ch, do_again = 0;
index a7073c371bcc01f8a02ece1502d59f46ec70d5d8..326fa8993d7beda5234f093d28f977824a1bb469 100644 (file)
@@ -55,7 +55,7 @@ void snd_emux_update_channel(struct snd_emux_port *port,
                             struct snd_midi_channel *chan, int update);
 void snd_emux_update_port(struct snd_emux_port *port, int update);
 
-void snd_emux_timer_callback(unsigned long data);
+void snd_emux_timer_callback(struct timer_list *t);
 
 /* emux_effect.c */
 #ifdef SNDRV_EMUX_USE_RAW_EFFECT