From: Takashi Iwai Date: Mon, 19 Jan 2015 10:44:40 +0000 (+0100) Subject: ALSA: line6: Use setup_timer() and mod_timer() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f2524b347b1ce16ce6a34cb194445e25bc6ae42;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ALSA: line6: Use setup_timer() and mod_timer() No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index fc852f6ab8bc..19904d677114 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c @@ -415,8 +415,7 @@ void line6_start_timer(struct timer_list *timer, unsigned int msecs, void (*function)(unsigned long), unsigned long data) { setup_timer(timer, function, data); - timer->expires = jiffies + msecs * HZ / 1000; - add_timer(timer); + mod_timer(timer, jiffies + msecs * HZ / 1000); } /* diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c index aae78d8a82d9..7f97f4a812a7 100644 --- a/sound/usb/line6/toneport.c +++ b/sound/usb/line6/toneport.c @@ -433,11 +433,9 @@ static int toneport_try_init(struct usb_interface *interface, toneport_setup(toneport); - init_timer(&toneport->timer); - toneport->timer.expires = jiffies + TONEPORT_PCM_DELAY * HZ; - toneport->timer.function = toneport_start_pcm; - toneport->timer.data = (unsigned long)toneport; - add_timer(&toneport->timer); + setup_timer(&toneport->timer, toneport_start_pcm, + (unsigned long)toneport); + mod_timer(&toneport->timer, jiffies + TONEPORT_PCM_DELAY * HZ); return 0; }