]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/pty.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / char / pty.c
index da32889d22c0992a32f00560f2fbeec41519878f..49f3997fd251d95cfaec443d98f5a15037f52c68 100644 (file)
@@ -149,15 +149,14 @@ static int pty_write_room(struct tty_struct *tty)
 static int pty_chars_in_buffer(struct tty_struct *tty)
 {
        struct tty_struct *to = tty->link;
-       ssize_t (*chars_in_buffer)(struct tty_struct *);
        int count;
 
        /* We should get the line discipline lock for "tty->link" */
-       if (!to || !(chars_in_buffer = to->ldisc.chars_in_buffer))
+       if (!to || !to->ldisc.chars_in_buffer)
                return 0;
 
        /* The ldisc must report 0 if no characters available to be read */
-       count = chars_in_buffer(to);
+       count = to->ldisc.chars_in_buffer(to);
 
        if (tty->driver->subtype == PTY_TYPE_SLAVE) return count;