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

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

diff -u --recursive --new-file v2.3.0/linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
@@ -605,7 +605,7 @@
 			tty->canon_data++;
 			if (tty->fasync)
 				kill_fasync(tty->fasync, SIGIO);
-			if (tty->read_wait)
+			if (waitqueue_active(&tty->read_wait))
 				wake_up_interruptible(&tty->read_wait);
 			return;
 		}
@@ -707,7 +707,7 @@
 	if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
 		if (tty->fasync)
 			kill_fasync(tty->fasync, SIGIO);
-		if (tty->read_wait)
+		if (waitqueue_active(&tty->read_wait))
 			wake_up_interruptible(&tty->read_wait);
 	}
 
@@ -868,7 +868,7 @@
 			 unsigned char *buf, size_t nr)
 {
 	unsigned char *b = buf;
-	struct wait_queue wait = { current, NULL };
+	DECLARE_WAITQUEUE(wait, current);
 	int c;
 	int minimum, time;
 	ssize_t retval = 0;
@@ -1058,7 +1058,7 @@
 			  const unsigned char * buf, size_t nr)
 {
 	const unsigned char *b = buf;
-	struct wait_queue wait = { current, NULL };
+	DECLARE_WAITQUEUE(wait, current);
 	int c;
 	ssize_t retval = 0;
 

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