diff options
Diffstat (limited to 'drivers/media/video/c-qcam.c')
-rw-r--r-- | drivers/media/video/c-qcam.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/video/c-qcam.c b/drivers/media/video/c-qcam.c index 2c85ced61150..fe1e67bb1ca8 100644 --- a/drivers/media/video/c-qcam.c +++ b/drivers/media/video/c-qcam.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/videodev.h> | 36 | #include <linux/videodev.h> |
37 | #include <media/v4l2-common.h> | 37 | #include <media/v4l2-common.h> |
38 | #include <linux/mutex.h> | 38 | #include <linux/mutex.h> |
39 | #include <linux/jiffies.h> | ||
39 | 40 | ||
40 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
41 | 42 | ||
@@ -95,7 +96,8 @@ static unsigned int qcam_await_ready1(struct qcam_device *qcam, | |||
95 | unsigned long oldjiffies = jiffies; | 96 | unsigned long oldjiffies = jiffies; |
96 | unsigned int i; | 97 | unsigned int i; |
97 | 98 | ||
98 | for (oldjiffies = jiffies; (jiffies - oldjiffies) < msecs_to_jiffies(40); ) | 99 | for (oldjiffies = jiffies; |
100 | time_before(jiffies, oldjiffies + msecs_to_jiffies(40)); ) | ||
99 | if (qcam_ready1(qcam) == value) | 101 | if (qcam_ready1(qcam) == value) |
100 | return 0; | 102 | return 0; |
101 | 103 | ||
@@ -120,7 +122,8 @@ static unsigned int qcam_await_ready2(struct qcam_device *qcam, int value) | |||
120 | unsigned long oldjiffies = jiffies; | 122 | unsigned long oldjiffies = jiffies; |
121 | unsigned int i; | 123 | unsigned int i; |
122 | 124 | ||
123 | for (oldjiffies = jiffies; (jiffies - oldjiffies) < msecs_to_jiffies(40); ) | 125 | for (oldjiffies = jiffies; |
126 | time_before(jiffies, oldjiffies + msecs_to_jiffies(40)); ) | ||
124 | if (qcam_ready2(qcam) == value) | 127 | if (qcam_ready2(qcam) == value) |
125 | return 0; | 128 | return 0; |
126 | 129 | ||