summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/tty_buffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 2da05fa37aec..6a8563633d4b 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -375,10 +375,11 @@ int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)
375 struct tty_buffer *tb = port->buf.tail; 375 struct tty_buffer *tb = port->buf.tail;
376 int flags = (flag == TTY_NORMAL) ? TTYB_NORMAL : 0; 376 int flags = (flag == TTY_NORMAL) ? TTYB_NORMAL : 0;
377 377
378 if (!tty_buffer_request_room(port, 1)) 378 if (!__tty_buffer_request_room(port, 1, flags))
379 return 0; 379 return 0;
380 380
381 *flag_buf_ptr(tb, tb->used) = flag; 381 if (~tb->flags & TTYB_NORMAL)
382 *flag_buf_ptr(tb, tb->used) = flag;
382 *char_buf_ptr(tb, tb->used++) = ch; 383 *char_buf_ptr(tb, tb->used++) = ch;
383 384
384 return 1; 385 return 1;