aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 05:42:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:42 -0400
commit8b0a88d5912ab549d5adac2c8498ecdaae5319a5 (patch)
tree8ed71420259881fd6d1dd5f5841ffe2f3c5d1fa2 /include/linux/tty_driver.h
parent7d7b93c1452f381350dbaf276a63357fa6559e6d (diff)
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 'include/linux/tty_driver.h')
-rw-r--r--include/linux/tty_driver.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index ba891dd23550..005d06ad46a6 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -15,6 +15,20 @@
15 * 15 *
16 * Optional method. Default behaviour is to use the ttys array 16 * Optional method. Default behaviour is to use the ttys array
17 * 17 *
18 * int (*install)(struct tty_driver *self, struct tty_struct *tty)
19 *
20 * Install a new tty into the tty driver internal tables. Used in
21 * conjunction with lookup and remove methods.
22 *
23 * Optional method. Default behaviour is to use the ttys array
24 *
25 * void (*remove)(struct tty_driver *self, struct tty_struct *tty)
26 *
27 * Remove a closed tty from the tty driver internal tables. Used in
28 * conjunction with lookup and remove methods.
29 *
30 * Optional method. Default behaviour is to use the ttys array
31 *
18 * int (*open)(struct tty_struct * tty, struct file * filp); 32 * int (*open)(struct tty_struct * tty, struct file * filp);
19 * 33 *
20 * This routine is called when a particular tty device is opened. 34 * This routine is called when a particular tty device is opened.
@@ -212,6 +226,8 @@ struct tty_driver;
212 226
213struct tty_operations { 227struct tty_operations {
214 struct tty_struct * (*lookup)(struct tty_driver *driver, int idx); 228 struct tty_struct * (*lookup)(struct tty_driver *driver, int idx);
229 int (*install)(struct tty_driver *driver, struct tty_struct *tty);
230 void (*remove)(struct tty_driver *driver, struct tty_struct *tty);
215 int (*open)(struct tty_struct * tty, struct file * filp); 231 int (*open)(struct tty_struct * tty, struct file * filp);
216 void (*close)(struct tty_struct * tty, struct file * filp); 232 void (*close)(struct tty_struct * tty, struct file * filp);
217 void (*shutdown)(struct tty_struct *tty); 233 void (*shutdown)(struct tty_struct *tty);