X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fchar%2Fpty.c;h=9b5a2c0e7008c82183649e6006784088ceabd220;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=da32889d22c0992a32f00560f2fbeec41519878f;hpb=6a77f38946aaee1cd85eeec6cf4229b204c15071;p=linux-2.6.git diff --git a/drivers/char/pty.c b/drivers/char/pty.c index da32889d2..9b5a2c0e7 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -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; } /* @@ -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;