Skip to contentSkip to conversation

2.4.3-pre2: fix lp_read

PATCH New Tim Waugh 1 participant 1 message Mar 6, 2001 Char and misc drivers

lore
Share & tools
lore

Tim Waugh

author
#0 lore raw

PATCH 1/1 2.4.3-pre2: fix lp_read

This patch should make printer status readback a little less broken than before.

2001-06-03 Tim Waugh <[email protected]>

* drivers/char/lp.c (lp_read): The loop is broken. Remove it, and restore 2.2.x behaviour.

drivers/char/lp.c renamed from drivers/char/lp.c.readback +1 -20
@@ -344,26 +344,7 @@
 		return -EINTR;
 
 	parport_claim_or_block (lp_table[minor].dev);
-
-	for (;;) {
-		retval = parport_read (port, kbuf, count);
-
-		if (retval)
-			break;
-
-		if (file->f_flags & O_NONBLOCK)
-			break;
-
-		/* Wait for an interrupt. */
-		interruptible_sleep_on_timeout (&lp_table[minor].waitq,
-						LP_TIMEOUT_POLLED);
-
-		if (signal_pending (current)) {
-			retval = -EINTR;
-			break;
-		}
-	}
-
+	retval = parport_read (port, kbuf, count);
 	parport_release (lp_table[minor].dev);
 
 	if (retval > 0 && copy_to_user (buf, kbuf, retval))