diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-19 11:21:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-20 17:35:51 -0300 |
commit | 201700d3544c653d453716a60976efe1987110af (patch) | |
tree | 8052fb09ac170b6de4b28737f89cb2621fac4fe7 /drivers/media/video/ivtv/ivtv-streams.c | |
parent | fe06fe0a4d0f781f8ae0570e4d7e517a81878c1d (diff) |
V4L/DVB (5865): Remove usage of HZ on ivtv driver, replacing by msecs_to_jiffies
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-streams.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index 28711718749..322b347b67c 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c @@ -565,7 +565,7 @@ int ivtv_start_v4l2_encode_stream(struct ivtv_stream *s) /* Initialize Digitizer for Capture */ ivtv_vapi(itv, CX2341X_ENC_INITIALIZE_INPUT, 0); - ivtv_sleep_timeout(HZ / 10, 0); + ivtv_msleep_timeout(100, 0); } /* begin_capture */ @@ -781,8 +781,9 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end) set_current_state(TASK_INTERRUPTIBLE); /* wait 2s for EOS interrupt */ - while (!test_bit(IVTV_F_I_EOS, &itv->i_flags) && jiffies < then + 2 * HZ) { - schedule_timeout(HZ / 100); + while (!test_bit(IVTV_F_I_EOS, &itv->i_flags) && + jiffies < then + msecs_to_jiffies (2000)) { + schedule_timeout(msecs_to_jiffies(10)); } /* To convert jiffies to ms, we must multiply by 1000 @@ -821,7 +822,8 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end) } else if (read_reg(IVTV_REG_DMASTATUS) & 0x02) { break; } - } while (!ivtv_sleep_timeout(HZ / 100, 1) && then + HZ * 2 > jiffies); + } while (!ivtv_msleep_timeout(10, 1) && + then + msecs_to_jiffies(2000) > jiffies); set_current_state(TASK_RUNNING); remove_wait_queue(&s->waitq, &wait); @@ -892,7 +894,7 @@ int ivtv_stop_v4l2_decode_stream(struct ivtv_stream *s, int flags, u64 pts) break; tmp = data[3]; } - if (ivtv_sleep_timeout(HZ/10, 1)) + if (ivtv_msleep_timeout(100, 1)) break; } } |