diff options
| author | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:34:18 -0500 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2015-01-19 05:34:18 -0500 |
| commit | 3d6f0e0cb348ab1d74cb6fcb2745ebca6029bf9d (patch) | |
| tree | 80fdcc8f67bdf569c52ccd80b6443d59a865896f /sound/pci | |
| parent | 8a3e7dfc90dcb2ed6e79b559ce072aeaec291ebd (diff) | |
ALSA: korg1212: 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/pci')
| -rw-r--r-- | sound/pci/korg1212/korg1212.c | 11 |
1 files changed, 4 insertions, 7 deletions
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) | |||
| 585 | korg1212->sharedBufferPtr->cardCommand = 0xffffffff; | 585 | korg1212->sharedBufferPtr->cardCommand = 0xffffffff; |
| 586 | /* program the timer */ | 586 | /* program the timer */ |
| 587 | korg1212->stop_pending_cnt = HZ; | 587 | korg1212->stop_pending_cnt = HZ; |
| 588 | korg1212->timer.expires = jiffies + 1; | 588 | mod_timer(&korg1212->timer, jiffies + 1); |
| 589 | add_timer(&korg1212->timer); | ||
| 590 | } | 589 | } |
| 591 | } | 590 | } |
| 592 | 591 | ||
| @@ -617,8 +616,7 @@ static void snd_korg1212_timer_func(unsigned long data) | |||
| 617 | } else { | 616 | } else { |
| 618 | if (--korg1212->stop_pending_cnt > 0) { | 617 | if (--korg1212->stop_pending_cnt > 0) { |
| 619 | /* reprogram timer */ | 618 | /* reprogram timer */ |
| 620 | korg1212->timer.expires = jiffies + 1; | 619 | mod_timer(&korg1212->timer, jiffies + 1); |
| 621 | add_timer(&korg1212->timer); | ||
| 622 | } else { | 620 | } else { |
| 623 | snd_printd("korg1212_timer_func timeout\n"); | 621 | snd_printd("korg1212_timer_func timeout\n"); |
| 624 | korg1212->sharedBufferPtr->cardCommand = 0; | 622 | korg1212->sharedBufferPtr->cardCommand = 0; |
| @@ -2172,9 +2170,8 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci, | |||
| 2172 | init_waitqueue_head(&korg1212->wait); | 2170 | init_waitqueue_head(&korg1212->wait); |
| 2173 | spin_lock_init(&korg1212->lock); | 2171 | spin_lock_init(&korg1212->lock); |
| 2174 | mutex_init(&korg1212->open_mutex); | 2172 | mutex_init(&korg1212->open_mutex); |
| 2175 | init_timer(&korg1212->timer); | 2173 | setup_timer(&korg1212->timer, snd_korg1212_timer_func, |
| 2176 | korg1212->timer.function = snd_korg1212_timer_func; | 2174 | (unsigned long)korg1212); |
| 2177 | korg1212->timer.data = (unsigned long)korg1212; | ||
| 2178 | 2175 | ||
| 2179 | korg1212->irq = -1; | 2176 | korg1212->irq = -1; |
| 2180 | korg1212->clkSource = K1212_CLKIDX_Local; | 2177 | korg1212->clkSource = K1212_CLKIDX_Local; |
