TTY: introduce deinit helpers for proper ldisc shutdown
commit6716671d8c1c07a8072098764d1b7cbfef7412ad
authorJiri Slaby <jslaby@suse.cz>
Wed, 23 Mar 2011 09:48:35 +0000 (23 10:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 19 Apr 2011 21:43:01 +0000 (19 14:43 -0700)
tree7aa2e138fb9565ffd37591bfe1887b379f57dfd7
parentc18d77aa00cde1215d9e045ba8f93004fe843f38
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>
drivers/tty/tty_io.c
drivers/tty/tty_ldisc.c
include/linux/tty.h