PD#150542: stream_input: use msecs_to_jiffies to replace magic number

Change-Id: Id9dd93f82896f68f4f510fdb935a534d53ec718d
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
This commit is contained in:
Nanxin Qin
2017-11-02 11:29:42 +08:00
committed by Dongjin Kim
parent f220e52bd2
commit 52e166c021

View File

@@ -385,7 +385,7 @@ void stbuf_vdec2_init(struct stream_buf_s *buf)
s32 stbuf_wait_space(struct stream_buf_s *stream_buf, size_t count)
{
struct stream_buf_s *p = stream_buf;
long time_out = 20;
long time_out = 200;
p->wcnt = count;
@@ -394,7 +394,8 @@ s32 stbuf_wait_space(struct stream_buf_s *stream_buf, size_t count)
mod_timer(&p->timer, jiffies + STBUF_WAIT_INTERVAL);
if (wait_event_interruptible_timeout
(p->wq, stbuf_space(p) >= count, time_out) == 0) {
(p->wq, stbuf_space(p) >= count,
msecs_to_jiffies(time_out)) == 0) {
del_timer_sync(&p->timer);
return -EAGAIN;