This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / media / video / bw-qcam.c
index 356bde0..31412e8 100644 (file)
@@ -91,6 +91,11 @@ static inline int read_lpstatus(struct qcam_device *q)
        return parport_read_status(q->pport);
 }
 
+static inline int read_lpcontrol(struct qcam_device *q)
+{
+       return parport_read_control(q->pport);
+}
+
 static inline int read_lpdata(struct qcam_device *q)
 {
        return parport_read_data(q->pport);
@@ -244,7 +249,8 @@ static int qc_waithand(struct qcam_device *q, int val)
                           
                        if(runs++>maxpoll)
                        {
-                               msleep_interruptible(5);
+                               current->state=TASK_INTERRUPTIBLE;
+                               schedule_timeout(HZ/200);
                        }
                        if(runs>(maxpoll+1000)) /* 5 seconds */
                                return -1;
@@ -263,7 +269,8 @@ static int qc_waithand(struct qcam_device *q, int val)
                           
                        if(runs++>maxpoll)
                        {
-                               msleep_interruptible(5);
+                               current->state=TASK_INTERRUPTIBLE;
+                               schedule_timeout(HZ/200);
                        }
                        if(runs++>(maxpoll+1000)) /* 5 seconds */
                                return -1;
@@ -295,7 +302,8 @@ static unsigned int qc_waithand2(struct qcam_device *q, int val)
                   
                if(runs++>maxpoll)
                {
-                       msleep_interruptible(5);
+                       current->state=TASK_INTERRUPTIBLE;
+                       schedule_timeout(HZ/200);
                }
                if(runs++>(maxpoll+1000)) /* 5 seconds */
                        return 0;
@@ -661,7 +669,8 @@ long qc_capture(struct qcam_device * q, char __user *buf, unsigned long len)
                   time will be 240 / 200 = 1.2 seconds. The compile-time
                   default is to yield every 4 lines. */
                if (i >= yield) {
-                       msleep_interruptible(5);
+                       current->state=TASK_INTERRUPTIBLE;
+                       schedule_timeout(HZ/200);
                        yield = i + yieldlines;
                }
        }