aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_vt220.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/sclp_vt220.c')
-rw-r--r--drivers/s390/char/sclp_vt220.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 06bd85824d7b..9e02625c82cf 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -16,6 +16,7 @@
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/tty.h> 17#include <linux/tty.h>
18#include <linux/tty_driver.h> 18#include <linux/tty_driver.h>
19#include <linux/tty_flip.h>
19#include <linux/sched.h> 20#include <linux/sched.h>
20#include <linux/errno.h> 21#include <linux/errno.h>
21#include <linux/mm.h> 22#include <linux/mm.h>
@@ -482,16 +483,7 @@ sclp_vt220_receiver_fn(struct evbuf_header *evbuf)
482 /* Send input to line discipline */ 483 /* Send input to line discipline */
483 buffer++; 484 buffer++;
484 count--; 485 count--;
485 /* Prevent buffer overrun by discarding input. Note that 486 tty_insert_flip_string(sclp_vt220_tty, buffer, count);
486 * because buffer_push works asynchronously, we cannot wait
487 * for the buffer to be emptied. */
488 if (count + sclp_vt220_tty->flip.count > TTY_FLIPBUF_SIZE)
489 count = TTY_FLIPBUF_SIZE - sclp_vt220_tty->flip.count;
490 memcpy(sclp_vt220_tty->flip.char_buf_ptr, buffer, count);
491 memset(sclp_vt220_tty->flip.flag_buf_ptr, TTY_NORMAL, count);
492 sclp_vt220_tty->flip.char_buf_ptr += count;
493 sclp_vt220_tty->flip.flag_buf_ptr += count;
494 sclp_vt220_tty->flip.count += count;
495 tty_flip_buffer_push(sclp_vt220_tty); 487 tty_flip_buffer_push(sclp_vt220_tty);
496 break; 488 break;
497 } 489 }