tty: Document locking for tty driver methods
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 16 Jun 2014 13:16:58 +0000 (09:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2014 23:05:19 +0000 (16:05 -0700)
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>
include/linux/tty_driver.h

index 756a609..e48c608 100644 (file)
  *     This routine is mandatory; if this routine is not filled in,
  *     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);
  *
  *     This routine is called when a particular tty device is closed.
  *     Note: called even if the corresponding open() failed.
  *
- *     Required method.
+ *     Required method. Called with tty lock held.
  *
  * void (*shutdown)(struct tty_struct * tty);
  *
  *
  *     Optional:
  *
+ *     Called with tty lock held.
+ *
  * int (*break_ctl)(struct tty_struct *tty, int state);
  *
  *     This optional routine requests the tty driver to turn on or