patch-2.3.99-pre6 linux/drivers/char/ppdev.c

Next file: linux/drivers/char/pty.c
Previous file: linux/drivers/char/planb.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/drivers/char/ppdev.c linux/drivers/char/ppdev.c
@@ -569,15 +569,16 @@
 	return 0;
 }
 
+/* No kernel lock held - fine */
 static unsigned int pp_poll (struct file * file, poll_table * wait)
 {
 	struct pp_struct *pp = file->private_data;
 	unsigned int mask = 0;
 
+	poll_wait (file, &pp->irq_wait, wait);
 	if (atomic_read (&pp->irqc))
 		mask |= POLLIN | POLLRDNORM;
 
-	poll_wait (file, &pp->irq_wait, wait);
 	return mask;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)