From: Andre Noll Date: Sat, 28 May 2011 11:32:42 +0000 (+0200) Subject: alsa: Simplify pre_select(). X-Git-Tag: v0.4.7~3 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=4434989abcd113f73ca5217c3a9ecc74ce2eb1db;p=paraslash.git alsa: Simplify pre_select(). No need to open-code sched_request_timeout_ms(). --- diff --git a/alsa_write.c b/alsa_write.c index c2a4cc1e..047eeaa3 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -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)