aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-06-16 09:16:58 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-10 19:05:19 -0400
commited617e44234ee03a60edbf0809f696f0b9cf1b90 (patch)
tree0c949737a7744541f91ed7131fc38d6ffdd897f3
parented9891bf093638fad29f89c10b536550d29b129d (diff)
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>
-rw-r--r--include/linux/tty_driver.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 756a60989294..e48c608a8fa8 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -35,14 +35,14 @@
35 * This routine is mandatory; if this routine is not filled in, 35 * This routine is mandatory; if this routine is not filled in,
36 * the attempted open will fail with ENODEV. 36 * the attempted open will fail with ENODEV.
37 * 37 *
38 * Required method. 38 * Required method. Called with tty lock held.
39 * 39 *
40 * void (*close)(struct tty_struct * tty, struct file * filp); 40 * void (*close)(struct tty_struct * tty, struct file * filp);
41 * 41 *
42 * This routine is called when a particular tty device is closed. 42 * This routine is called when a particular tty device is closed.
43 * Note: called even if the corresponding open() failed. 43 * Note: called even if the corresponding open() failed.
44 * 44 *
45 * Required method. 45 * Required method. Called with tty lock held.
46 * 46 *
47 * void (*shutdown)(struct tty_struct * tty); 47 * void (*shutdown)(struct tty_struct * tty);
48 * 48 *
@@ -172,6 +172,8 @@
172 * 172 *
173 * Optional: 173 * Optional:
174 * 174 *
175 * Called with tty lock held.
176 *
175 * int (*break_ctl)(struct tty_struct *tty, int state); 177 * int (*break_ctl)(struct tty_struct *tty, int state);
176 * 178 *
177 * This optional routine requests the tty driver to turn on or 179 * This optional routine requests the tty driver to turn on or