patch-2.1.23 linux/drivers/char/psaux.c

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

diff -u --recursive --new-file v2.1.22/linux/drivers/char/psaux.c linux/drivers/char/psaux.c
@@ -45,6 +45,7 @@
 #include <linux/malloc.h>
 #include <linux/miscdevice.h>
 #include <linux/random.h>
+#include <linux/poll.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -494,13 +495,11 @@
 }
 
 
-static int aux_select(struct inode *inode, struct file *file, int sel_type, select_table * wait)
+static unsigned int aux_poll(struct file *file, poll_table * wait)
 {
-	if (sel_type != SEL_IN)
-		return 0;
+	poll_wait(&queue->proc_list, wait);
 	if (aux_ready)
-		return 1;
-	select_wait(&queue->proc_list, wait);
+		return POLLIN | POLLRDNORM;
 	return 0;
 }
 
@@ -510,7 +509,7 @@
 	read_aux,
 	write_aux,
 	NULL, 		/* readdir */
-	aux_select,
+	aux_poll,
 	NULL, 		/* ioctl */
 	NULL,		/* mmap */
 	open_aux,

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