]> git.tue.mpg.de Git - paraslash.git/commitdiff
alsa: Simplify pre_select().
authorAndre Noll <maan@systemlinux.org>
Sat, 28 May 2011 11:32:42 +0000 (13:32 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 28 May 2011 11:32:42 +0000 (13:32 +0200)
No need to open-code sched_request_timeout_ms().

alsa_write.c

index c2a4cc1e94f47d9cf9717334059e6cf57df4970a..047eeaa348f9017431fc42e5c121ba08f331d3b0 100644 (file)
@@ -145,7 +145,6 @@ static void alsa_write_pre_select(struct sched *s, struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
        struct private_alsa_write_data *pad = wn->private_data;
-       struct timeval tv;
        snd_pcm_sframes_t avail, underrun;
        int ret = btr_node_status(wn->btrn, wn->min_iqs, BTR_NT_LEAF);
 
@@ -171,8 +170,7 @@ static void alsa_write_pre_select(struct sched *s, struct task *t)
        if (underrun < 50)
                underrun = 50;
        underrun -= 50;
-       ms2tv(underrun, &tv);
-       sched_request_timeout(&tv, s);
+       sched_request_timeout_ms(underrun, s);
 }
 
 static void alsa_close(struct writer_node *wn)