提交 0f2524b3 编写于 作者: T Takashi Iwai

ALSA: line6: Use setup_timer() and mod_timer()

No functional change, refactoring with the standard helpers.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 61864d84
...@@ -415,8 +415,7 @@ void line6_start_timer(struct timer_list *timer, unsigned int msecs, ...@@ -415,8 +415,7 @@ void line6_start_timer(struct timer_list *timer, unsigned int msecs,
void (*function)(unsigned long), unsigned long data) void (*function)(unsigned long), unsigned long data)
{ {
setup_timer(timer, function, data); setup_timer(timer, function, data);
timer->expires = jiffies + msecs * HZ / 1000; mod_timer(timer, jiffies + msecs * HZ / 1000);
add_timer(timer);
} }
/* /*
......
...@@ -433,11 +433,9 @@ static int toneport_try_init(struct usb_interface *interface, ...@@ -433,11 +433,9 @@ static int toneport_try_init(struct usb_interface *interface,
toneport_setup(toneport); toneport_setup(toneport);
init_timer(&toneport->timer); setup_timer(&toneport->timer, toneport_start_pcm,
toneport->timer.expires = jiffies + TONEPORT_PCM_DELAY * HZ; (unsigned long)toneport);
toneport->timer.function = toneport_start_pcm; mod_timer(&toneport->timer, jiffies + TONEPORT_PCM_DELAY * HZ);
toneport->timer.data = (unsigned long)toneport;
add_timer(&toneport->timer);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册