V4L/DVB (5860): Use msecs_to_jiffies instead of HZ on some webcam drivers
authorMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 17 Jul 2007 19:29:07 +0000 (16:29 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 20 Jul 2007 20:35:50 +0000 (17:35 -0300)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/c-qcam.c
drivers/media/video/vino.c

index 925ff17efbbcbedea434bef38134ef0c1a5ecae2..f76c6a6c37667cd40564654346d18814f245186a 100644 (file)
@@ -95,7 +95,7 @@ static unsigned int qcam_await_ready1(struct qcam_device *qcam,
        unsigned long oldjiffies = jiffies;
        unsigned int i;
 
-       for (oldjiffies = jiffies; (jiffies - oldjiffies) < (HZ/25); )
+       for (oldjiffies = jiffies; (jiffies - oldjiffies) < msecs_to_jiffies(40); )
                if (qcam_ready1(qcam) == value)
                        return 0;
 
@@ -120,7 +120,7 @@ static unsigned int qcam_await_ready2(struct qcam_device *qcam, int value)
        unsigned long oldjiffies = jiffies;
        unsigned int i;
 
-       for (oldjiffies = jiffies; (jiffies - oldjiffies) < (HZ/25); )
+       for (oldjiffies = jiffies; (jiffies - oldjiffies) < msecs_to_jiffies(40); )
                if (qcam_ready2(qcam) == value)
                        return 0;
 
index e94a9a6036f59d59723bc07a799318653f716c61..a0c1647a2ba460b95a03fa3161aefde5a206c272 100644 (file)
@@ -2080,7 +2080,7 @@ static int vino_wait_for_frame(struct vino_channel_settings *vcs)
 
        /* to ensure that schedule_timeout will return immediately
         * if VINO interrupt was triggered meanwhile */
-       schedule_timeout_interruptible(HZ / 10);
+       schedule_timeout_interruptible(msecs_to_jiffies(100));
 
        if (signal_pending(current))
                err = -EINTR;