patch-2.3.1 linux/drivers/char/qpmouse.c

Next file: linux/drivers/char/radio-cadet.c
Previous file: linux/drivers/char/pty.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/drivers/char/qpmouse.c linux/drivers/char/qpmouse.c
@@ -55,7 +55,7 @@
 struct qp_queue {
 	unsigned long head;
 	unsigned long tail;
-	struct wait_queue *proc_list;
+	wait_queue_head_t proc_list;
 	struct fasync_struct *fasync;
 	unsigned char buf[QP_BUF_SIZE];
 };
@@ -258,7 +258,7 @@
 static ssize_t read_qp(struct file * file, char * buffer,
 			size_t count, loff_t *ppos)
 {
-	struct wait_queue wait = { current, NULL };
+	DECLARE_WAITQUEUE(wait, current);
 	ssize_t i = count;
 	unsigned char c;
 
@@ -354,7 +354,7 @@
 	queue = (struct qp_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
 	memset(queue, 0, sizeof(*queue));
 	queue->head = queue->tail = 0;
-	queue->proc_list = NULL;
+	init_waitqueue_head(&queue->proc_list);
 
 	return 0;
 }

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