diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-01-08 09:15:12 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-02-14 09:55:01 -0500 |
commit | 736c9fd2902d919b075cf9cf371d1733c5ff635d (patch) | |
tree | 7485aac0000dd535fa0a1566723316b9163bcdc7 /drivers/s390 | |
parent | 7292e7e01cc98fa04a9a3eb7ca11d1bca99c35e9 (diff) |
s390/3270: readd tty3270_open
Reintroduce the tty3270_open function which has been removed by
git commit 20cda6f2 "TTY: tty3270, add tty install". Without
the open function in the tty_operations tty_open will return
-ENODEV and the 3270 tty will not work.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/tty3270.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index 43ea0593bdb0..964018402b36 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -926,6 +926,20 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) | |||
926 | } | 926 | } |
927 | 927 | ||
928 | /* | 928 | /* |
929 | * This routine is called whenever a 3270 tty is opened. | ||
930 | */ | ||
931 | static int | ||
932 | tty3270_open(struct tty_struct *tty, struct file *filp) | ||
933 | { | ||
934 | struct tty3270 *tp = tty->driver_data; | ||
935 | struct tty_port *port = &tp->port; | ||
936 | |||
937 | port->count++; | ||
938 | tty_port_tty_set(port, tty); | ||
939 | return 0; | ||
940 | } | ||
941 | |||
942 | /* | ||
929 | * This routine is called when the 3270 tty is closed. We wait | 943 | * This routine is called when the 3270 tty is closed. We wait |
930 | * for the remaining request to be completed. Then we clean up. | 944 | * for the remaining request to be completed. Then we clean up. |
931 | */ | 945 | */ |
@@ -1753,6 +1767,7 @@ static long tty3270_compat_ioctl(struct tty_struct *tty, | |||
1753 | static const struct tty_operations tty3270_ops = { | 1767 | static const struct tty_operations tty3270_ops = { |
1754 | .install = tty3270_install, | 1768 | .install = tty3270_install, |
1755 | .cleanup = tty3270_cleanup, | 1769 | .cleanup = tty3270_cleanup, |
1770 | .open = tty3270_open, | ||
1756 | .close = tty3270_close, | 1771 | .close = tty3270_close, |
1757 | .write = tty3270_write, | 1772 | .write = tty3270_write, |
1758 | .put_char = tty3270_put_char, | 1773 | .put_char = tty3270_put_char, |