aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-07-17 12:06:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-17 12:13:38 -0400
commit36b3c070d2346c890d690d71f6eab02f8c511137 (patch)
tree1a1345329e3827eec3cf0de70eac2b2f1d663b55 /include
parent3db1ddb725dcd9a2bb32be2b64d0688c3e1c4579 (diff)
tty: Move the handling of the tty release logic
Now that we don't have tty->termios tied to drivers->tty we can untangle the logic here. In addition we can push the removal logic out of the destructor path. At that point we can think about sorting out tty_port and console and all the other ugly hangovers. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tty.h1
-rw-r--r--include/linux/tty_driver.h11
2 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index d5e75ee0f4d1..a39e72325e78 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -423,7 +423,6 @@ extern void tty_unthrottle(struct tty_struct *tty);
423extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws); 423extern int tty_do_resize(struct tty_struct *tty, struct winsize *ws);
424extern void tty_driver_remove_tty(struct tty_driver *driver, 424extern void tty_driver_remove_tty(struct tty_driver *driver,
425 struct tty_struct *tty); 425 struct tty_struct *tty);
426extern void tty_shutdown(struct tty_struct *tty);
427extern void tty_free_termios(struct tty_struct *tty); 426extern void tty_free_termios(struct tty_struct *tty);
428extern int is_current_pgrp_orphaned(void); 427extern int is_current_pgrp_orphaned(void);
429extern struct pid *tty_get_pgrp(struct tty_struct *tty); 428extern struct pid *tty_get_pgrp(struct tty_struct *tty);
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 04419c141b00..80e72dc564a5 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -45,14 +45,9 @@
45 * 45 *
46 * void (*shutdown)(struct tty_struct * tty); 46 * void (*shutdown)(struct tty_struct * tty);
47 * 47 *
48 * This routine is called synchronously when a particular tty device 48 * This routine is called under the tty lock when a particular tty device
49 * is closed for the last time freeing up the resources. 49 * is closed for the last time. It executes before the tty resources
50 * Note that tty_shutdown() is not called if ops->shutdown is defined. 50 * are freed so may execute while another function holds a tty kref.
51 * This means one is responsible to take care of calling ops->remove (e.g.
52 * via tty_driver_remove_tty) and releasing tty->termios.
53 * Note that this hook may be called from *all* the contexts where one
54 * uses tty refcounting (e.g. tty_port_tty_get).
55 *
56 * 51 *
57 * void (*cleanup)(struct tty_struct * tty); 52 * void (*cleanup)(struct tty_struct * tty);
58 * 53 *