diff options
Diffstat (limited to 'drivers/char/c-qcam.c')
-rw-r--r-- | drivers/char/c-qcam.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/char/c-qcam.c b/drivers/char/c-qcam.c index e424266c8..e6d4c16b5 100644 --- a/drivers/char/c-qcam.c +++ b/drivers/char/c-qcam.c @@ -149,7 +149,7 @@ static int qc_detect(struct qcam_device *qcam) ostat = stat = parport_read_status(qcam->pport); for (i=0; i<250; i++) { - udelay(1000); + mdelay(1); stat = parport_read_status(qcam->pport); if (ostat != stat) { @@ -166,9 +166,9 @@ static void qc_reset(struct qcam_device *qcam) { parport_write_control(qcam->pport, 0xc); parport_write_control(qcam->pport, 0x8); - udelay(1000); + mdelay(1); parport_write_control(qcam->pport, 0xc); - udelay(1000); + mdelay(1); } /* Reset the QuickCam and program for brightness, contrast, @@ -325,7 +325,7 @@ static long qc_capture(struct qcam_device *q, char *buf, unsigned long len) { /* Turn the port around */ parport_frob_control(q->pport, 0x20, 0x20); - udelay(3000); + mdelay(3); qcam_set_ack(q, 0); if (qcam_await_ready1(q, 1)) { kfree(tmpbuf); @@ -356,7 +356,7 @@ static long qc_capture(struct qcam_device *q, char *buf, unsigned long len) wantlen -= t; if (t < s) break; - if (need_resched) + if (current->need_resched) schedule(); } @@ -377,7 +377,7 @@ static long qc_capture(struct qcam_device *q, char *buf, unsigned long len) int l; do { l = qcam_read_bytes(q, tmpbuf, 3); - if (need_resched) + if (current->need_resched) schedule(); } while (l && (tmpbuf[0] == 0x7e || tmpbuf[1] == 0x7e || tmpbuf[2] == 0x7e)); if (tmpbuf[0] != 0xe || tmpbuf[1] != 0x0 || tmpbuf[2] != 0xf) @@ -392,7 +392,7 @@ static long qc_capture(struct qcam_device *q, char *buf, unsigned long len) return len; } parport_frob_control(q->pport, 0x20, 0); - udelay(3000); + mdelay(3); qcam_set_ack(q, 1); if (qcam_await_ready1(q, 0)) { @@ -407,7 +407,7 @@ static long qc_capture(struct qcam_device *q, char *buf, unsigned long len) int l; do { l = qcam_read_bytes(q, tmpbuf, 1); - if (need_resched) + if (current->need_resched) schedule(); } while (l && tmpbuf[0] == 0x7e); l = qcam_read_bytes(q, tmpbuf+1, 2); @@ -646,6 +646,7 @@ static struct video_device qcam_template= qcam_close, qcam_read, qcam_write, + NULL, qcam_ioctl, NULL, qcam_init_done, |