patch-2.1.132 linux/drivers/pnp/parport_probe.c

Next file: linux/drivers/scsi/Config.in
Previous file: linux/drivers/pci/quirks.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/drivers/pnp/parport_probe.c linux/drivers/pnp/parport_probe.c
@@ -54,8 +54,10 @@
 	unsigned int count = 0;
 	unsigned char z=0;
 	unsigned char Byte=0;
+	unsigned long igiveupat=jiffies+5*HZ;
 
-	for (i=0; ; i++) {
+	for (i=0; time_before(jiffies, igiveupat); i++) {
+	       /* if(current->need_resched) schedule(); */
 		parport_write_control(port, parport_read_control(port) | 2); /* AutoFeed high */
 		if (parport_wait_peripheral(port, 0x40, 0)) {
 #ifdef DEBUG_PROBE

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov