diff options
Diffstat (limited to 'drivers/s390')
-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 | |||
11 | config TN3270_TTY | 11 | config TN3270_TTY |
12 | def_tristate y | 12 | def_tristate y |
13 | prompt "Support for tty input/output on 3270 terminals" | 13 | prompt "Support for tty input/output on 3270 terminals" |
14 | depends on TN3270 | 14 | depends on TN3270 && TTY |
15 | help | 15 | help |
16 | Include support for using an IBM 3270 terminal as a Linux tty. | 16 | Include support for using an IBM 3270 terminal as a Linux tty. |
17 | 17 | ||
@@ -33,7 +33,7 @@ config TN3270_CONSOLE | |||
33 | config TN3215 | 33 | config TN3215 |
34 | def_bool y | 34 | def_bool y |
35 | prompt "Support for 3215 line mode terminal" | 35 | prompt "Support for 3215 line mode terminal" |
36 | depends on CCW | 36 | depends on CCW && TTY |
37 | help | 37 | help |
38 | Include support for IBM 3215 line-mode terminals. | 38 | Include support for IBM 3215 line-mode terminals. |
39 | 39 | ||
@@ -51,7 +51,7 @@ config CCW_CONSOLE | |||
51 | config SCLP_TTY | 51 | config SCLP_TTY |
52 | def_bool y | 52 | def_bool y |
53 | prompt "Support for SCLP line mode terminal" | 53 | prompt "Support for SCLP line mode terminal" |
54 | depends on S390 | 54 | depends on S390 && TTY |
55 | help | 55 | help |
56 | Include support for IBM SCLP line-mode terminals. | 56 | Include support for IBM SCLP line-mode terminals. |
57 | 57 | ||
@@ -66,7 +66,7 @@ config SCLP_CONSOLE | |||
66 | config SCLP_VT220_TTY | 66 | config SCLP_VT220_TTY |
67 | def_bool y | 67 | def_bool y |
68 | prompt "Support for SCLP VT220-compatible terminal" | 68 | prompt "Support for SCLP VT220-compatible terminal" |
69 | depends on S390 | 69 | depends on S390 && TTY |
70 | help | 70 | help |
71 | Include support for an IBM SCLP VT220-compatible terminal. | 71 | Include support for an IBM SCLP VT220-compatible terminal. |
72 | 72 | ||
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, | |||
412 | break; | 412 | break; |
413 | 413 | ||
414 | case CTRLCHAR_CTRL: | 414 | case CTRLCHAR_CTRL: |
415 | tty_insert_flip_char(tty, cchar, TTY_NORMAL); | 415 | tty_insert_flip_char(&raw->port, cchar, |
416 | tty_flip_buffer_push(tty); | 416 | TTY_NORMAL); |
417 | tty_flip_buffer_push(&raw->port); | ||
417 | break; | 418 | break; |
418 | 419 | ||
419 | case CTRLCHAR_NONE: | 420 | case CTRLCHAR_NONE: |
@@ -425,8 +426,9 @@ static void raw3215_irq(struct ccw_device *cdev, unsigned long intparm, | |||
425 | count++; | 426 | count++; |
426 | } else | 427 | } else |
427 | count -= 2; | 428 | count -= 2; |
428 | tty_insert_flip_string(tty, raw->inbuf, count); | 429 | tty_insert_flip_string(&raw->port, raw->inbuf, |
429 | tty_flip_buffer_push(tty); | 430 | count); |
431 | tty_flip_buffer_push(&raw->port); | ||
430 | break; | 432 | break; |
431 | } | 433 | } |
432 | } else if (req->type == RAW3215_WRITE) { | 434 | } else if (req->type == RAW3215_WRITE) { |
@@ -970,7 +972,7 @@ static int tty3215_open(struct tty_struct *tty, struct file * filp) | |||
970 | 972 | ||
971 | tty_port_tty_set(&raw->port, tty); | 973 | tty_port_tty_set(&raw->port, tty); |
972 | 974 | ||
973 | tty->low_latency = 0; /* don't use bottom half for pushing chars */ | 975 | raw->port.low_latency = 0; /* don't use bottom half for pushing chars */ |
974 | /* | 976 | /* |
975 | * Start up 3215 device | 977 | * Start up 3215 device |
976 | */ | 978 | */ |
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); | |||
43 | static inline void | 43 | static inline void |
44 | kbd_put_queue(struct tty_port *port, int ch) | 44 | kbd_put_queue(struct tty_port *port, int ch) |
45 | { | 45 | { |
46 | struct tty_struct *tty = tty_port_tty_get(port); | 46 | tty_insert_flip_char(port, ch, 0); |
47 | if (!tty) | 47 | tty_schedule_flip(port); |
48 | return; | ||
49 | tty_insert_flip_char(tty, ch, 0); | ||
50 | tty_schedule_flip(tty); | ||
51 | tty_kref_put(tty); | ||
52 | } | 48 | } |
53 | 49 | ||
54 | static inline void | 50 | static inline void |
55 | kbd_puts_queue(struct tty_port *port, char *cp) | 51 | kbd_puts_queue(struct tty_port *port, char *cp) |
56 | { | 52 | { |
57 | struct tty_struct *tty = tty_port_tty_get(port); | ||
58 | if (!tty) | ||
59 | return; | ||
60 | while (*cp) | 53 | while (*cp) |
61 | tty_insert_flip_char(tty, *cp++, 0); | 54 | tty_insert_flip_char(port, *cp++, 0); |
62 | tty_schedule_flip(tty); | 55 | tty_schedule_flip(port); |
63 | tty_kref_put(tty); | ||
64 | } | 56 | } |
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) | |||
65 | { | 65 | { |
66 | tty_port_tty_set(&sclp_port, tty); | 66 | tty_port_tty_set(&sclp_port, tty); |
67 | tty->driver_data = NULL; | 67 | tty->driver_data = NULL; |
68 | tty->low_latency = 0; | 68 | sclp_port.low_latency = 0; |
69 | return 0; | 69 | return 0; |
70 | } | 70 | } |
71 | 71 | ||
@@ -342,8 +342,8 @@ sclp_tty_input(unsigned char* buf, unsigned int count) | |||
342 | case CTRLCHAR_SYSRQ: | 342 | case CTRLCHAR_SYSRQ: |
343 | break; | 343 | break; |
344 | case CTRLCHAR_CTRL: | 344 | case CTRLCHAR_CTRL: |
345 | tty_insert_flip_char(tty, cchar, TTY_NORMAL); | 345 | tty_insert_flip_char(&sclp_port, cchar, TTY_NORMAL); |
346 | tty_flip_buffer_push(tty); | 346 | tty_flip_buffer_push(&sclp_port); |
347 | break; | 347 | break; |
348 | case CTRLCHAR_NONE: | 348 | case CTRLCHAR_NONE: |
349 | /* send (normal) input to line discipline */ | 349 | /* send (normal) input to line discipline */ |
@@ -351,11 +351,11 @@ sclp_tty_input(unsigned char* buf, unsigned int count) | |||
351 | (strncmp((const char *) buf + count - 2, "^n", 2) && | 351 | (strncmp((const char *) buf + count - 2, "^n", 2) && |
352 | strncmp((const char *) buf + count - 2, "\252n", 2))) { | 352 | strncmp((const char *) buf + count - 2, "\252n", 2))) { |
353 | /* add the auto \n */ | 353 | /* add the auto \n */ |
354 | tty_insert_flip_string(tty, buf, count); | 354 | tty_insert_flip_string(&sclp_port, buf, count); |
355 | tty_insert_flip_char(tty, '\n', TTY_NORMAL); | 355 | tty_insert_flip_char(&sclp_port, '\n', TTY_NORMAL); |
356 | } else | 356 | } else |
357 | tty_insert_flip_string(tty, buf, count - 2); | 357 | tty_insert_flip_string(&sclp_port, buf, count - 2); |
358 | tty_flip_buffer_push(tty); | 358 | tty_flip_buffer_push(&sclp_port); |
359 | break; | 359 | break; |
360 | } | 360 | } |
361 | tty_kref_put(tty); | 361 | 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) | |||
461 | static void | 461 | static void |
462 | sclp_vt220_receiver_fn(struct evbuf_header *evbuf) | 462 | sclp_vt220_receiver_fn(struct evbuf_header *evbuf) |
463 | { | 463 | { |
464 | struct tty_struct *tty = tty_port_tty_get(&sclp_vt220_port); | ||
465 | char *buffer; | 464 | char *buffer; |
466 | unsigned int count; | 465 | unsigned int count; |
467 | 466 | ||
468 | /* Ignore input if device is not open */ | ||
469 | if (tty == NULL) | ||
470 | return; | ||
471 | |||
472 | buffer = (char *) ((addr_t) evbuf + sizeof(struct evbuf_header)); | 467 | buffer = (char *) ((addr_t) evbuf + sizeof(struct evbuf_header)); |
473 | count = evbuf->length - sizeof(struct evbuf_header); | 468 | count = evbuf->length - sizeof(struct evbuf_header); |
474 | 469 | ||
@@ -480,11 +475,10 @@ sclp_vt220_receiver_fn(struct evbuf_header *evbuf) | |||
480 | /* Send input to line discipline */ | 475 | /* Send input to line discipline */ |
481 | buffer++; | 476 | buffer++; |
482 | count--; | 477 | count--; |
483 | tty_insert_flip_string(tty, buffer, count); | 478 | tty_insert_flip_string(&sclp_vt220_port, buffer, count); |
484 | tty_flip_buffer_push(tty); | 479 | tty_flip_buffer_push(&sclp_vt220_port); |
485 | break; | 480 | break; |
486 | } | 481 | } |
487 | tty_kref_put(tty); | ||
488 | } | 482 | } |
489 | 483 | ||
490 | /* | 484 | /* |
@@ -495,7 +489,7 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp) | |||
495 | { | 489 | { |
496 | if (tty->count == 1) { | 490 | if (tty->count == 1) { |
497 | tty_port_tty_set(&sclp_vt220_port, tty); | 491 | tty_port_tty_set(&sclp_vt220_port, tty); |
498 | tty->low_latency = 0; | 492 | sclp_vt220_port.low_latency = 0; |
499 | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { | 493 | if (!tty->winsize.ws_row && !tty->winsize.ws_col) { |
500 | tty->winsize.ws_row = 24; | 494 | tty->winsize.ws_row = 24; |
501 | tty->winsize.ws_col = 80; | 495 | 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) | |||
860 | tty->driver_data = tp; | 860 | tty->driver_data = tp; |
861 | tty->winsize.ws_row = tp->view.rows - 2; | 861 | tty->winsize.ws_row = tp->view.rows - 2; |
862 | tty->winsize.ws_col = tp->view.cols; | 862 | tty->winsize.ws_col = tp->view.cols; |
863 | tty->low_latency = 0; | 863 | tp->port.low_latency = 0; |
864 | /* why to reassign? */ | 864 | /* why to reassign? */ |
865 | tty_port_tty_set(&tp->port, tty); | 865 | tty_port_tty_set(&tp->port, tty); |
866 | tp->inattr = TF_INPUT; | 866 | tp->inattr = TF_INPUT; |
@@ -893,7 +893,7 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) | |||
893 | } | 893 | } |
894 | 894 | ||
895 | tty_port_tty_set(&tp->port, tty); | 895 | tty_port_tty_set(&tp->port, tty); |
896 | tty->low_latency = 0; | 896 | tp->port.low_latency = 0; |
897 | tty->winsize.ws_row = tp->view.rows - 2; | 897 | tty->winsize.ws_row = tp->view.rows - 2; |
898 | tty->winsize.ws_col = tp->view.cols; | 898 | tty->winsize.ws_col = tp->view.cols; |
899 | 899 | ||