ALSA: aloop: Use setup_timer() and mod_timer()
authorTakashi Iwai <tiwai@suse.de>
Mon, 19 Jan 2015 10:27:31 +0000 (11:27 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Jan 2015 10:27:31 +0000 (11:27 +0100)
No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/aloop.c

index 7ea53399404dc59f3823dd3e92a2c4c41df10f03..7f9126efc1e51229373316b25e965e92ffbc08a9 100644 (file)
@@ -181,8 +181,7 @@ static void loopback_timer_start(struct loopback_pcm *dpcm)
        }
        tick = dpcm->period_size_frac - dpcm->irq_pos;
        tick = (tick + dpcm->pcm_bps - 1) / dpcm->pcm_bps;
-       dpcm->timer.expires = jiffies + tick;
-       add_timer(&dpcm->timer);
+       mod_timer(&dpcm->timer, jiffies + tick);
 }
 
 /* call in cable->lock */