tty: Document locking for tty driver methods

The tty core calls the tty driver's open, close and hangup
methods holding the tty lock.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley 2014-06-16 09:16:58 -04:00 committed by Greg Kroah-Hartman
parent ed9891bf09
commit ed617e4423

View file

@ -35,14 +35,14 @@
* This routine is mandatory; if this routine is not filled in, * This routine is mandatory; if this routine is not filled in,
* the attempted open will fail with ENODEV. * the attempted open will fail with ENODEV.
* *
* Required method. * Required method. Called with tty lock held.
* *
* void (*close)(struct tty_struct * tty, struct file * filp); * void (*close)(struct tty_struct * tty, struct file * filp);
* *
* This routine is called when a particular tty device is closed. * This routine is called when a particular tty device is closed.
* Note: called even if the corresponding open() failed. * Note: called even if the corresponding open() failed.
* *
* Required method. * Required method. Called with tty lock held.
* *
* void (*shutdown)(struct tty_struct * tty); * void (*shutdown)(struct tty_struct * tty);
* *
@ -172,6 +172,8 @@
* *
* Optional: * Optional:
* *
* Called with tty lock held.
*
* int (*break_ctl)(struct tty_struct *tty, int state); * int (*break_ctl)(struct tty_struct *tty, int state);
* *
* This optional routine requests the tty driver to turn on or * This optional routine requests the tty driver to turn on or