]> err.no Git - linux-2.6/blobdiff - drivers/media/video/c-qcam.c
RDMA/cxgb3: Fix regression caused by class_device -> device conversion
[linux-2.6] / drivers / media / video / c-qcam.c
index d4d5adfb0351ca557d8e30bd2837519e1715a531..fe1e67bb1ca860b6a946afb0ed6804654c8bf4ce 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/videodev.h>
 #include <media/v4l2-common.h>
 #include <linux/mutex.h>
+#include <linux/jiffies.h>
 
 #include <asm/uaccess.h>
 
@@ -95,7 +96,8 @@ static unsigned int qcam_await_ready1(struct qcam_device *qcam,
        unsigned long oldjiffies = jiffies;
        unsigned int i;
 
-       for (oldjiffies = jiffies; (jiffies - oldjiffies) < msecs_to_jiffies(40); )
+       for (oldjiffies = jiffies;
+            time_before(jiffies, oldjiffies + msecs_to_jiffies(40)); )
                if (qcam_ready1(qcam) == value)
                        return 0;
 
@@ -120,7 +122,8 @@ static unsigned int qcam_await_ready2(struct qcam_device *qcam, int value)
        unsigned long oldjiffies = jiffies;
        unsigned int i;
 
-       for (oldjiffies = jiffies; (jiffies - oldjiffies) < msecs_to_jiffies(40); )
+       for (oldjiffies = jiffies;
+            time_before(jiffies, oldjiffies + msecs_to_jiffies(40)); )
                if (qcam_ready2(qcam) == value)
                        return 0;
 
@@ -689,7 +692,9 @@ static const struct file_operations qcam_fops = {
        .open           = video_exclusive_open,
        .release        = video_exclusive_release,
        .ioctl          = qcam_ioctl,
+#ifdef CONFIG_COMPAT
        .compat_ioctl   = v4l_compat_ioctl32,
+#endif
        .read           = qcam_read,
        .llseek         = no_llseek,
 };