diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:44:40 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:46:02 -0500 |
commit | 0f2524b347b1ce16ce6a34cb194445e25bc6ae42 (patch) | |
tree | d10bf2a45525a39463519479a2fa639fb8b74ba0 /sound/usb/line6 | |
parent | 61864d844c296933d40c02683252bbea5193b101 (diff) |
ALSA: line6: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6')
-rw-r--r-- | sound/usb/line6/driver.c | 3 | ||||
-rw-r--r-- | sound/usb/line6/toneport.c | 8 |
2 files changed, 4 insertions, 7 deletions
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, | |||
415 | void (*function)(unsigned long), unsigned long data) | 415 | void (*function)(unsigned long), unsigned long data) |
416 | { | 416 | { |
417 | setup_timer(timer, function, data); | 417 | setup_timer(timer, function, data); |
418 | timer->expires = jiffies + msecs * HZ / 1000; | 418 | mod_timer(timer, jiffies + msecs * HZ / 1000); |
419 | add_timer(timer); | ||
420 | } | 419 | } |
421 | 420 | ||
422 | /* | 421 | /* |
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, | |||
433 | 433 | ||
434 | toneport_setup(toneport); | 434 | toneport_setup(toneport); |
435 | 435 | ||
436 | init_timer(&toneport->timer); | 436 | setup_timer(&toneport->timer, toneport_start_pcm, |
437 | toneport->timer.expires = jiffies + TONEPORT_PCM_DELAY * HZ; | 437 | (unsigned long)toneport); |
438 | toneport->timer.function = toneport_start_pcm; | 438 | mod_timer(&toneport->timer, jiffies + TONEPORT_PCM_DELAY * HZ); |
439 | toneport->timer.data = (unsigned long)toneport; | ||
440 | add_timer(&toneport->timer); | ||
441 | 439 | ||
442 | return 0; | 440 | return 0; |
443 | } | 441 | } |