diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-25 08:09:27 -0700 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-10-26 14:44:59 +0200 |
commit | 7211ec6392c8650ebc804023178c245464417ed2 (patch) | |
tree | e94c80c2618a50be61994b55372390484dcff456 /sound/pci/korg1212 | |
parent | 20e5f8bfb153bdd43b5be194658f8ad814470a5d (diff) |
ALSA: 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. These are all the
"mechanical" changes remaining in the sound subsystem.
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/korg1212')
-rw-r--r-- | sound/pci/korg1212/korg1212.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 04cd71c74e5c..c7b007164c99 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -599,9 +599,9 @@ static void snd_korg1212_SendStopAndWait(struct snd_korg1212 *korg1212) } /* timer callback for checking the ack of stop request */ -static void snd_korg1212_timer_func(unsigned long data) +static void snd_korg1212_timer_func(struct timer_list *t) { - struct snd_korg1212 *korg1212 = (struct snd_korg1212 *) data; + struct snd_korg1212 *korg1212 = from_timer(korg1212, t, timer); unsigned long flags; spin_lock_irqsave(&korg1212->lock, flags); @@ -2189,8 +2189,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci, init_waitqueue_head(&korg1212->wait); spin_lock_init(&korg1212->lock); mutex_init(&korg1212->open_mutex); - setup_timer(&korg1212->timer, snd_korg1212_timer_func, - (unsigned long)korg1212); + timer_setup(&korg1212->timer, snd_korg1212_timer_func, 0); korg1212->irq = -1; korg1212->clkSource = K1212_CLKIDX_Local; |