patch-2.4.14 linux/drivers/parport/ieee1284.c
Next file: linux/drivers/parport/ieee1284_ops.c
Previous file: linux/drivers/parport/ChangeLog
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Thu Oct 25 00:07:39 2001
- Orig file:
v2.4.13/linux/drivers/parport/ieee1284.c
- Orig date:
Sat May 19 18:07:04 2001
diff -u --recursive --new-file v2.4.13/linux/drivers/parport/ieee1284.c linux/drivers/parport/ieee1284.c
@@ -119,9 +119,10 @@
int usec)
{
/* Zero return code is success, >0 is timeout. */
- int counter = usec / 5;
+ int count = usec / 5 + 2;
+ int i;
unsigned char status;
- for (; counter > 0; counter--) {
+ for (i = 0; i < count; i++) {
status = parport_read_status (port);
if ((status & mask) == result)
return 0;
@@ -129,7 +130,8 @@
return -EINTR;
if (current->need_resched)
break;
- udelay (5);
+ if (i >= 2)
+ udelay (5);
}
return 1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)