patch-2.1.57 linux/drivers/char/lp.c

Next file: linux/drivers/char/lp_m68k.c
Previous file: linux/drivers/char/istallion.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.56/linux/drivers/char/lp.c linux/drivers/char/lp.c
@@ -11,6 +11,9 @@
  * lp_read (Status readback) support added by Carsten Gross,
  *                                             carsten@sol.wohnheim.uni-ulm.de
  * Support for parport by Philip Blundell <Philip.Blundell@pobox.com>
+ * Reverted interrupt to polling at runtime if more than one device is parport
+ * registered and joined the interrupt and polling code.
+ *                               by Andrea Arcangeli <arcangeli@mbox.queen.it>
  */
 
 /* This driver is about due for a rewrite. */
@@ -251,7 +254,7 @@
 					sti();
 				}
 
-				if (current->signal & ~current->blocked) {
+				if (signal_pending(current)) {
 					if (total_bytes_written + bytes_written)
 						return total_bytes_written + bytes_written;
 					else
@@ -376,7 +379,7 @@
 #ifdef LP_READ_DEBUG
 			printk(KERN_DEBUG "lp_read: (Autofeed low) timeout\n");
 #endif
-			if (current->signal & ~current->blocked) {
+			if (signal_pending(current)) {
 				lp_select_in_high(minor);
 				parport_release(lp_table[minor].dev);
 				if (temp !=buf)

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