From: Takashi Iwai Date: Mon, 19 Jan 2015 10:34:18 +0000 (+0100) Subject: ALSA: korg1212: Use setup_timer() and mod_timer() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d6f0e0cb348ab1d74cb6fcb2745ebca6029bf9d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ALSA: korg1212: Use setup_timer() and mod_timer() No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 59d21c9401d2..bd569e580277 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c @@ -585,8 +585,7 @@ static void snd_korg1212_SendStop(struct snd_korg1212 *korg1212) korg1212->sharedBufferPtr->cardCommand = 0xffffffff; /* program the timer */ korg1212->stop_pending_cnt = HZ; - korg1212->timer.expires = jiffies + 1; - add_timer(&korg1212->timer); + mod_timer(&korg1212->timer, jiffies + 1); } } @@ -617,8 +616,7 @@ static void snd_korg1212_timer_func(unsigned long data) } else { if (--korg1212->stop_pending_cnt > 0) { /* reprogram timer */ - korg1212->timer.expires = jiffies + 1; - add_timer(&korg1212->timer); + mod_timer(&korg1212->timer, jiffies + 1); } else { snd_printd("korg1212_timer_func timeout\n"); korg1212->sharedBufferPtr->cardCommand = 0; @@ -2172,9 +2170,8 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci, init_waitqueue_head(&korg1212->wait); spin_lock_init(&korg1212->lock); mutex_init(&korg1212->open_mutex); - init_timer(&korg1212->timer); - korg1212->timer.function = snd_korg1212_timer_func; - korg1212->timer.data = (unsigned long)korg1212; + setup_timer(&korg1212->timer, snd_korg1212_timer_func, + (unsigned long)korg1212); korg1212->irq = -1; korg1212->clkSource = K1212_CLKIDX_Local;