From: Peter Hurley Date: Mon, 16 Jun 2014 13:16:58 +0000 (-0400) Subject: tty: Document locking for tty driver methods X-Git-Tag: firefly_0821_release~176^2~3490^2~48 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ed617e44234ee03a60edbf0809f696f0b9cf1b90;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Greg Kroah-Hartman --- 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 @@ * 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); * @@ -172,6 +172,8 @@ * * 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