summaryrefslogtreecommitdiff
path: root/drivers/char/pty.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 13:42:19 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 20:51:42 +0400
commit8b0a88d5912ab549d5adac2c8498ecdaae5319a5 (patch)
tree8ed71420259881fd6d1dd5f5841ffe2f3c5d1fa2 /drivers/char/pty.c
parent7d7b93c1452f381350dbaf276a63357fa6559e6d (diff)
downloadlinux-8b0a88d5912ab549d5adac2c8498ecdaae5319a5.tar.xz
tty: More driver operations
We have the lookup operation abstracted which is nice for pty cleanup but we really want to abstract the add/remove entries as well so that we can pull the pty code out of the tty core and create a clear defined interface for the tty driver table. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r--drivers/char/pty.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 0fdfa0517140..4e6490bda751 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -433,8 +433,22 @@ static void pty_shutdown(struct tty_struct *tty)
kfree(tty->termios_locked);
}
+/* We have no need to install and remove our tty objects as devpts does all
+ the work for us */
+
+static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
+{
+ return 0;
+}
+
+static void pty_remove(struct tty_driver *driver, struct tty_struct *tty)
+{
+}
+
static const struct tty_operations ptm_unix98_ops = {
.lookup = ptm_unix98_lookup,
+ .install = pty_install,
+ .remove = pty_remove,
.open = pty_open,
.close = pty_close,
.write = pty_write,
@@ -449,6 +463,8 @@ static const struct tty_operations ptm_unix98_ops = {
static const struct tty_operations pty_unix98_ops = {
.lookup = pts_unix98_lookup,
+ .install = pty_install,
+ .remove = pty_remove,
.open = pty_open,
.close = pty_close,
.write = pty_write,