diff options
author | Jiri Slaby <jslaby@suse.cz> | 2011-03-23 05:48:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-19 17:43:01 -0400 |
commit | 6716671d8c1c07a8072098764d1b7cbfef7412ad (patch) | |
tree | 7aa2e138fb9565ffd37591bfe1887b379f57dfd7 /include/linux/tty.h | |
parent | c18d77aa00cde1215d9e045ba8f93004fe843f38 (diff) |
TTY: introduce deinit helpers for proper ldisc shutdown
Introduce deinitialize_tty_struct which should be called after
initialize_tty_struct and before successfull tty_ldisc_setup.
It calls tty_ldisc_deinit which is opposite of tty_ldisc_init. It only
puts a reference to ldisc and assigns NULL to tty->ldisc.
It will be used to shut down ldisc when tty_release cannot be called
yet.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 9f469c700550..4db4ca79f895 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -472,6 +472,7 @@ extern int tty_add_file(struct tty_struct *tty, struct file *file); | |||
472 | extern void free_tty_struct(struct tty_struct *tty); | 472 | extern void free_tty_struct(struct tty_struct *tty); |
473 | extern void initialize_tty_struct(struct tty_struct *tty, | 473 | extern void initialize_tty_struct(struct tty_struct *tty, |
474 | struct tty_driver *driver, int idx); | 474 | struct tty_driver *driver, int idx); |
475 | extern void deinitialize_tty_struct(struct tty_struct *tty); | ||
475 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, | 476 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, |
476 | int first_ok); | 477 | int first_ok); |
477 | extern int tty_release(struct inode *inode, struct file *filp); | 478 | extern int tty_release(struct inode *inode, struct file *filp); |
@@ -525,6 +526,7 @@ extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); | |||
525 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); | 526 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); |
526 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); | 527 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); |
527 | extern void tty_ldisc_init(struct tty_struct *tty); | 528 | extern void tty_ldisc_init(struct tty_struct *tty); |
529 | extern void tty_ldisc_deinit(struct tty_struct *tty); | ||
528 | extern void tty_ldisc_begin(void); | 530 | extern void tty_ldisc_begin(void); |
529 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ | 531 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ |
530 | extern void tty_ldisc_enable(struct tty_struct *tty); | 532 | extern void tty_ldisc_enable(struct tty_struct *tty); |