aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-10-13 05:42:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-13 12:51:42 -0400
commit99f1fe189daf8e99a847e420567e49dd7ee2aae7 (patch)
tree09db410aa2b32e74086593eb771c75efe553a585 /include/linux/tty_driver.h
parent23499705753ab8b4c6b0b64e6c424a370bd900a1 (diff)
tty: Clean up the tty_init_dev changes further
Fix up the naming, style and extract some bits of code into the driver specific code 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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 2322313a8589..2c5c35c4656f 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -7,6 +7,14 @@
7 * defined; unless noted otherwise, they are optional, and can be 7 * defined; unless noted otherwise, they are optional, and can be
8 * filled in with a null pointer. 8 * filled in with a null pointer.
9 * 9 *
10 * struct tty_struct * (*lookup)(struct tty_driver *self, int idx)
11 *
12 * Return the tty device corresponding to idx, NULL if there is not
13 * one currently in use and an ERR_PTR value on error. Called under
14 * tty_mutex (for now!)
15 *
16 * Optional method. Default behaviour is to use the ttys array
17 *
10 * int (*open)(struct tty_struct * tty, struct file * filp); 18 * int (*open)(struct tty_struct * tty, struct file * filp);
11 * 19 *
12 * This routine is called when a particular tty device is opened. 20 * This routine is called when a particular tty device is opened.
@@ -203,6 +211,7 @@ struct tty_struct;
203struct tty_driver; 211struct tty_driver;
204 212
205struct tty_operations { 213struct tty_operations {
214 struct tty_struct * (*lookup)(struct tty_driver *driver, int idx);
206 int (*open)(struct tty_struct * tty, struct file * filp); 215 int (*open)(struct tty_struct * tty, struct file * filp);
207 void (*close)(struct tty_struct * tty, struct file * filp); 216 void (*close)(struct tty_struct * tty, struct file * filp);
208 void (*shutdown)(struct tty_struct *tty); 217 void (*shutdown)(struct tty_struct *tty);