mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
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>
This commit is contained in:
parent
3db1ddb725
commit
36b3c070d2
6 changed files with 34 additions and 50 deletions
|
@ -45,14 +45,9 @@
|
|||
*
|
||||
* void (*shutdown)(struct tty_struct * tty);
|
||||
*
|
||||
* This routine is called synchronously when a particular tty device
|
||||
* is closed for the last time freeing up the resources.
|
||||
* Note that tty_shutdown() is not called if ops->shutdown is defined.
|
||||
* This means one is responsible to take care of calling ops->remove (e.g.
|
||||
* via tty_driver_remove_tty) and releasing tty->termios.
|
||||
* Note that this hook may be called from *all* the contexts where one
|
||||
* uses tty refcounting (e.g. tty_port_tty_get).
|
||||
*
|
||||
* This routine is called under the tty lock when a particular tty device
|
||||
* is closed for the last time. It executes before the tty resources
|
||||
* are freed so may execute while another function holds a tty kref.
|
||||
*
|
||||
* void (*cleanup)(struct tty_struct * tty);
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue