summaryrefslogtreecommitdiff
path: root/sound/drivers/aloop.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 08:34:29 -0700
committerTakashi Iwai <tiwai@suse.de>2017-10-24 21:01:16 +0200
commitbc47ba90b01afe468cdd586b0dbe59b64862e2b7 (patch)
tree67919e97c5af07a8c1467218ea7640e51dd24ce8 /sound/drivers/aloop.c
parent1a0190157521704c11f8650756388b62f3887eb3 (diff)
ALSA: drivers: 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. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/aloop.c')
-rw-r--r--sound/drivers/aloop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 135adb17703c..afac886ffa28 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -529,9 +529,9 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable)
return running;
}
-static void loopback_timer_function(unsigned long data)
+static void loopback_timer_function(struct timer_list *t)
{
- struct loopback_pcm *dpcm = (struct loopback_pcm *)data;
+ struct loopback_pcm *dpcm = from_timer(dpcm, t, timer);
unsigned long flags;
spin_lock_irqsave(&dpcm->cable->lock, flags);
@@ -675,8 +675,7 @@ static int loopback_open(struct snd_pcm_substream *substream)
}
dpcm->loopback = loopback;
dpcm->substream = substream;
- setup_timer(&dpcm->timer, loopback_timer_function,
- (unsigned long)dpcm);
+ timer_setup(&dpcm->timer, loopback_timer_function, 0);
cable = loopback->cables[substream->number][dev];
if (!cable) {