Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / char / pty.c
index a473864..9b5a2c0 100644 (file)
@@ -35,7 +35,7 @@
 /* These are global because they are accessed in tty_io.c */
 #ifdef CONFIG_UNIX98_PTYS
 struct tty_driver *ptm_driver;
-struct tty_driver *pts_driver;
+static struct tty_driver *pts_driver;
 #endif
 
 static void pty_close(struct tty_struct * tty, struct file * filp)
@@ -111,7 +111,7 @@ static int pty_write(struct tty_struct * tty, const unsigned char *buf, int coun
        if (!to || tty->stopped)
                return 0;
 
-       c = to->ldisc.receive_room(to);
+       c = to->receive_room;
        if (c > count)
                c = count;
        to->ldisc.receive_buf(to, buf, NULL, c);
@@ -126,7 +126,7 @@ static int pty_write_room(struct tty_struct *tty)
        if (!to || tty->stopped)
                return 0;
 
-       return to->ldisc.receive_room(to);
+       return to->receive_room;
 }
 
 /*
@@ -151,6 +151,7 @@ static int pty_chars_in_buffer(struct tty_struct *tty)
        struct tty_struct *to = tty->link;
        int count;
 
+       /* We should get the line discipline lock for "tty->link" */
        if (!to || !to->ldisc.chars_in_buffer)
                return 0;