diff options
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/Kconfig | 8 | ||||
-rw-r--r-- | drivers/s390/char/con3215.c | 12 | ||||
-rw-r--r-- | drivers/s390/char/keyboard.h | 16 | ||||
-rw-r--r-- | drivers/s390/char/sclp_tty.c | 14 | ||||
-rw-r--r-- | drivers/s390/char/sclp_vt220.c | 12 | ||||
-rw-r--r-- | drivers/s390/char/tty3270.c | 4 |
6 files changed, 27 insertions, 39 deletions
diff --git a/drivers/s390/char/Kconfig b/drivers/s390/char/Kconfig index 2c9a776bd63c..71bf959732fe 100644 --- a/drivers/s390/char/Kconfig +++ b/drivers/s390/char/Kconfig @@ -11,7 +11,7 @@ config TN3270 config TN3270_TTY def_tristate y prompt "Support for tty input/output on 3270 terminals" - depends on TN3270 + depends on TN3270 && TTY help Include support for using an IBM 3270 terminal as a Linux tty. @@ -33,7 +33,7 @@ config TN3270_CONSOLE config TN3215 def_bool y prompt "Support for 3215 line mode terminal" - depends on CCW + depends on CCW && TTY help Include support for IBM 3215 line-mode terminals. @@ -51,7 +51,7 @@ config CCW_CONSOLE config SCLP_TTY def_bool y prompt "Support for SCLP line mode terminal" - depends on S390 + depends on S390 && TTY help Include support for IBM SCLP line-mode terminals. @@ -66,7 +66,7 @@ config SCLP_CONSOLE config SCLP_VT220_TTY def_bool y prompt "Support for SCLP VT220-compatible terminal" - depends on S390 + depends on S390 && TTY help Include support for an IBM SCLP VT220-compatible terminal. diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 33b7141a182f..7b00fa634d40 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -412,8 +412,9 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm, break; case CTRLCHAR_CTRL: - tty_insert_flip_char(tty, cchar, TTY_NORMAL); - tty_flip_buffer_push(tty); + tty_insert_flip_char(&raw->port, cchar, + TTY_NORMAL); + tty_flip_buffer_push(&raw->port); break; case CTRLCHAR_NONE: @@ -425,8 +426,9 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm, count++; } else count -= 2; - tty_insert_flip_string(tty, raw->inbuf, count); - tty_flip_buffer_push(tty); + tty_insert_flip_string(&raw->port, raw->inbuf, + count); + tty_flip_buffer_push(&raw->port); break; } } else if (req->type == RAW3215_WRITE) { @@ -970,7 +972,7 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp) tty_port_tty_set(&raw->port, tty); - tty->low_latency = 0; /* don't use bottom half for pushing chars */ + raw->port.low_latency = 0; /* don't use bottom half for pushing chars */ /* * Start up 3215 device */ diff --git a/drivers/s390/char/keyboard.h b/drivers/s390/char/keyboard.h index d0ae2be58191..a31f339211d5 100644 --- a/drivers/s390/char/keyboard.h +++ b/drivers/s390/char/keyboard.h @@ -43,22 +43,14 @@ int kbd_ioctl(struct kbd_data *, unsigned int, unsigned long); static inline void kbd_put_queue(struct tty_port *port, int ch) { - struct tty_struct *tty = tty_port_tty_get(port); - if (!tty) - return; - tty_insert_flip_char(tty, ch, 0); - tty_schedule_flip(tty); - tty_kref_put(tty); + tty_insert_flip_char(port, ch, 0); + tty_schedule_flip(port); } static inline void kbd_puts_queue(struct tty_port *port, char *cp) { - struct tty_struct *tty = tty_port_tty_get(port); - if (!tty) - return; while (*cp) - tty_insert_flip_char(tty, *cp++, 0); - tty_schedule_flip(tty); - tty_kref_put(tty); + tty_insert_flip_char(port, *cp++, 0); + tty_schedule_flip(port); } diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c index 877fbc37c1e7..14b4cb8abcc8 100644 --- a/drivers/s390/char/sclp_tty.c +++ b/drivers/s390/char/sclp_tty.c @@ -65,7 +65,7 @@ sclp_tty_open(struct tty_struct *tty, struct file *filp) { tty_port_tty_set(&sclp_port, tty); tty->driver_data = NULL; - tty->low_latency = 0; + sclp_port.low_latency = 0; return 0; } @@ -342,8 +342,8 @@ sclp_tty_input(unsigned char* buf, unsigned int count) case CTRLCHAR_SYSRQ: break; case CTRLCHAR_CTRL: - tty_insert_flip_char(tty, cchar, TTY_NORMAL); - tty_flip_buffer_push(tty); + tty_insert_flip_char(&sclp_port, cchar, TTY_NORMAL); + tty_flip_buffer_push(&sclp_port); break; case CTRLCHAR_NONE: /* send (normal) input to line discipline */ @@ -351,11 +351,11 @@ sclp_tty_input(unsigned char* buf, unsigned int count) (strncmp((const char *) buf + count - 2, "^n", 2) && strncmp((const char *) buf + count - 2, "\252n", 2))) { /* add the auto \n */ - tty_insert_flip_string(tty, buf, count); - tty_insert_flip_char(tty, '\n', TTY_NORMAL); + tty_insert_flip_string(&sclp_port, buf, count); + tty_insert_flip_char(&sclp_port, '\n', TTY_NORMAL); } else - tty_insert_flip_string(tty, buf, count - 2); - tty_flip_buffer_push(tty); + tty_insert_flip_string(&sclp_port, buf, count - 2); + tty_flip_buffer_push(&sclp_port); break; } tty_kref_put(tty); diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c index effcc8756e0a..6c92f62623be 100644 --- a/drivers/s390/char/sclp_vt220.c +++ b/drivers/s390/char/sclp_vt220.c @@ -461,14 +461,9 @@ sclp_vt220_write(struct tty_struct *tty, const unsigned char *buf, int count) static void sclp_vt220_receiver_fn(struct evbuf_header *evbuf) { - struct tty_struct *tty = tty_port_tty_get(&sclp_vt220_port); char *buffer; unsigned int count; - /* Ignore input if device is not open */ - if (tty == NULL) - return; - buffer = (char *) ((addr_t) evbuf + sizeof(struct evbuf_header)); count = evbuf->length - sizeof(struct evbuf_header); @@ -480,11 +475,10 @@ sclp_vt220_receiver_fn(struct evbuf_header *evbuf) /* Send input to line discipline */ buffer++; count--; - tty_insert_flip_string(tty, buffer, count); - tty_flip_buffer_push(tty); + tty_insert_flip_string(&sclp_vt220_port, buffer, count); + tty_flip_buffer_push(&sclp_vt220_port); break; } - tty_kref_put(tty); } /* @@ -495,7 +489,7 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp) { if (tty->count == 1) { tty_port_tty_set(&sclp_vt220_port, tty); - tty->low_latency = 0; + sclp_vt220_port.low_latency = 0; if (!tty->winsize.ws_row && !tty->winsize.ws_col) { tty->winsize.ws_row = 24; tty->winsize.ws_col = 80; diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 43ea0593bdb0..3860e796b65f 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c @@ -860,7 +860,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) tty->driver_data = tp; tty->winsize.ws_row = tp->view.rows - 2; tty->winsize.ws_col = tp->view.cols; - tty->low_latency = 0; + tp->port.low_latency = 0; /* why to reassign? */ tty_port_tty_set(&tp->port, tty); tp->inattr = TF_INPUT; @@ -893,7 +893,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) } tty_port_tty_set(&tp->port, tty); - tty->low_latency = 0; + tp->port.low_latency = 0; tty->winsize.ws_row = tp->view.rows - 2; tty->winsize.ws_col = tp->view.cols; |