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

Next file: linux/drivers/sbus/char/pcikbd.c
Previous file: linux/drivers/pci/oldproc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.126/linux/drivers/pnp/parport_probe.c linux/drivers/pnp/parport_probe.c
@@ -76,7 +76,7 @@
 			Byte |= (z<<4);
 			if (temp) 
 				*(temp++) = Byte; 
-			if (count++ == length)
+			if (++count == length)
 				temp = NULL;
 			/* Does the error line indicate end of data? */
 			if ((parport_read_status(port) & LP_PERRORP) == 
@@ -105,9 +105,8 @@
 	switch (parport_ieee1284_nibble_mode_ok(port, 4)) {
 	case 1:
 		current->state=TASK_INTERRUPTIBLE;
-		current->timeout=jiffies+1;
-		schedule();	/* HACK: wait 10ms because printer seems to
-				 * ack wrong */
+		/* HACK: wait 10ms because printer seems to ack wrong */
+		schedule_timeout((HZ+99)/100);	
 		result = read_polled(port, buffer, len);
 		break;
 	case 0:

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