From 4434989abcd113f73ca5217c3a9ecc74ce2eb1db Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 28 May 2011 13:32:42 +0200 Subject: [PATCH] alsa: Simplify pre_select(). No need to open-code sched_request_timeout_ms(). --- alsa_write.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) -- 2.39.5