aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-streams.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-19 10:21:04 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-20 16:35:51 -0400
commit201700d3544c653d453716a60976efe1987110af (patch)
tree8052fb09ac170b6de4b28737f89cb2621fac4fe7 /drivers/media/video/ivtv/ivtv-streams.c
parentfe06fe0a4d0f781f8ae0570e4d7e517a81878c1d (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.c12
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 287117187499..322b347b67c2 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)
565 /* Initialize Digitizer for Capture */ 565 /* Initialize Digitizer for Capture */
566 ivtv_vapi(itv, CX2341X_ENC_INITIALIZE_INPUT, 0); 566 ivtv_vapi(itv, CX2341X_ENC_INITIALIZE_INPUT, 0);
567 567
568 ivtv_sleep_timeout(HZ / 10, 0); 568 ivtv_msleep_timeout(100, 0);
569 } 569 }
570 570
571 /* begin_capture */ 571 /* begin_capture */
@@ -781,8 +781,9 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end)
781 set_current_state(TASK_INTERRUPTIBLE); 781 set_current_state(TASK_INTERRUPTIBLE);
782 782
783 /* wait 2s for EOS interrupt */ 783 /* wait 2s for EOS interrupt */
784 while (!test_bit(IVTV_F_I_EOS, &itv->i_flags) && jiffies < then + 2 * HZ) { 784 while (!test_bit(IVTV_F_I_EOS, &itv->i_flags) &&
785 schedule_timeout(HZ / 100); 785 jiffies < then + msecs_to_jiffies (2000)) {
786 schedule_timeout(msecs_to_jiffies(10));
786 } 787 }
787 788
788 /* To convert jiffies to ms, we must multiply by 1000 789 /* 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)
821 } else if (read_reg(IVTV_REG_DMASTATUS) & 0x02) { 822 } else if (read_reg(IVTV_REG_DMASTATUS) & 0x02) {
822 break; 823 break;
823 } 824 }
824 } while (!ivtv_sleep_timeout(HZ / 100, 1) && then + HZ * 2 > jiffies); 825 } while (!ivtv_msleep_timeout(10, 1) &&
826 then + msecs_to_jiffies(2000) > jiffies);
825 827
826 set_current_state(TASK_RUNNING); 828 set_current_state(TASK_RUNNING);
827 remove_wait_queue(&s->waitq, &wait); 829 remove_wait_queue(&s->waitq, &wait);
@@ -892,7 +894,7 @@ int ivtv_stop_v4l2_decode_stream(struct ivtv_stream *s, int flags, u64 pts)
892 break; 894 break;
893 tmp = data[3]; 895 tmp = data[3];
894 } 896 }
895 if (ivtv_sleep_timeout(HZ/10, 1)) 897 if (ivtv_msleep_timeout(100, 1))
896 break; 898 break;
897 } 899 }
898 } 900 }