diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-25 17:09:27 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-10-26 14:44:59 +0200 |
commit | 7211ec6392c8650ebc804023178c245464417ed2 (patch) | |
tree | e94c80c2618a50be61994b55372390484dcff456 /sound/pci/ctxfi | |
parent | ALSA: sb: Minor optimization / fix of timer usage in sb8_midi.c (diff) | |
download | linux-7211ec6392c8650ebc804023178c245464417ed2.tar.xz linux-7211ec6392c8650ebc804023178c245464417ed2.zip |
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/ctxfi')
-rw-r--r-- | sound/pci/ctxfi/cttimer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/cttimer.c b/sound/pci/ctxfi/cttimer.c index 8f945341720b..08e874e9a7f6 100644 --- a/sound/pci/ctxfi/cttimer.c +++ b/sound/pci/ctxfi/cttimer.c @@ -63,9 +63,9 @@ struct ct_timer { * system-timer-based updates */ -static void ct_systimer_callback(unsigned long data) +static void ct_systimer_callback(struct timer_list *t) { - struct ct_timer_instance *ti = (struct ct_timer_instance *)data; + struct ct_timer_instance *ti = from_timer(ti, t, timer); struct snd_pcm_substream *substream = ti->substream; struct snd_pcm_runtime *runtime = substream->runtime; struct ct_atc_pcm *apcm = ti->apcm; @@ -93,8 +93,7 @@ static void ct_systimer_callback(unsigned long data) static void ct_systimer_init(struct ct_timer_instance *ti) { - setup_timer(&ti->timer, ct_systimer_callback, - (unsigned long)ti); + timer_setup(&ti->timer, ct_systimer_callback, 0); } static void ct_systimer_start(struct ct_timer_instance *ti) |