[PATCH 3/4] tty: Document required behavior of tty driver close()

From: Peter Hurley
Date: Wed Jan 30 2013 - 12:47:24 EST


If the tty driver open() fails, the tty driver close() is still
called during the resultant tty release.

Signed-off-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
---
include/linux/tty_driver.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index dd976cf..756a609 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -40,6 +40,7 @@
* 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.
*
--
1.8.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/