提交 736c9fd2 编写于 作者: M Martin Schwidefsky

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: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 7292e7e0
...@@ -925,6 +925,20 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty) ...@@ -925,6 +925,20 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
return 0; return 0;
} }
/*
* This routine is called whenever a 3270 tty is opened.
*/
static int
tty3270_open(struct tty_struct *tty, struct file *filp)
{
struct tty3270 *tp = tty->driver_data;
struct tty_port *port = &tp->port;
port->count++;
tty_port_tty_set(port, tty);
return 0;
}
/* /*
* This routine is called when the 3270 tty is closed. We wait * This routine is called when the 3270 tty is closed. We wait
* for the remaining request to be completed. Then we clean up. * for the remaining request to be completed. Then we clean up.
...@@ -1753,6 +1767,7 @@ static long tty3270_compat_ioctl(struct tty_struct *tty, ...@@ -1753,6 +1767,7 @@ static long tty3270_compat_ioctl(struct tty_struct *tty,
static const struct tty_operations tty3270_ops = { static const struct tty_operations tty3270_ops = {
.install = tty3270_install, .install = tty3270_install,
.cleanup = tty3270_cleanup, .cleanup = tty3270_cleanup,
.open = tty3270_open,
.close = tty3270_close, .close = tty3270_close,
.write = tty3270_write, .write = tty3270_write,
.put_char = tty3270_put_char, .put_char = tty3270_put_char,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册