diff options
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r-- | drivers/char/pty.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index da32889d22c0..49f3997fd251 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c | |||
@@ -149,15 +149,14 @@ static int pty_write_room(struct tty_struct *tty) | |||
149 | static int pty_chars_in_buffer(struct tty_struct *tty) | 149 | static int pty_chars_in_buffer(struct tty_struct *tty) |
150 | { | 150 | { |
151 | struct tty_struct *to = tty->link; | 151 | struct tty_struct *to = tty->link; |
152 | ssize_t (*chars_in_buffer)(struct tty_struct *); | ||
153 | int count; | 152 | int count; |
154 | 153 | ||
155 | /* We should get the line discipline lock for "tty->link" */ | 154 | /* We should get the line discipline lock for "tty->link" */ |
156 | if (!to || !(chars_in_buffer = to->ldisc.chars_in_buffer)) | 155 | if (!to || !to->ldisc.chars_in_buffer) |
157 | return 0; | 156 | return 0; |
158 | 157 | ||
159 | /* The ldisc must report 0 if no characters available to be read */ | 158 | /* The ldisc must report 0 if no characters available to be read */ |
160 | count = chars_in_buffer(to); | 159 | count = to->ldisc.chars_in_buffer(to); |
161 | 160 | ||
162 | if (tty->driver->subtype == PTY_TYPE_SLAVE) return count; | 161 | if (tty->driver->subtype == PTY_TYPE_SLAVE) return count; |
163 | 162 | ||