summaryrefslogtreecommitdiff
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-09 00:26:41 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-14 03:45:38 +0400
commit21aca2fa00259f781d228496631b61dbb4274e90 (patch)
tree825e2b2ce47f55c27948112e89238c2a2a831f48 /include/linux/tty_driver.h
parent7f0bc6a68ed93f3b4ad77b94df5ef32446c583e3 (diff)
downloadlinux-21aca2fa00259f781d228496631b61dbb4274e90.tar.xz
TTY: pty, switch to tty_alloc_driver
Switch to the new driver allocation interface, as this is one of the special call-sites. Here, we need TTY_DRIVER_DYNAMIC_ALLOC to not allocate tty_driver->ports, cdevs and potentially other structures because we reserve too many lines in pty. Instead, it provides the tty_port<->tty_struct link in tty->ops->install already. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_driver.h')
-rw-r--r--include/linux/tty_driver.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 3adc362f0bd2..1a85f003d646 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -391,6 +391,9 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
* the requested timeout to the caller instead of using a simple
* on/off interface.
*
+ * TTY_DRIVER_DYNAMIC_ALLOC -- do not allocate structures which are
+ * needed per line for this driver as it would waste memory.
+ * The driver will take care.
*/
#define TTY_DRIVER_INSTALLED 0x0001
#define TTY_DRIVER_RESET_TERMIOS 0x0002
@@ -398,6 +401,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
#define TTY_DRIVER_DYNAMIC_DEV 0x0008
#define TTY_DRIVER_DEVPTS_MEM 0x0010
#define TTY_DRIVER_HARDWARE_BREAK 0x0020
+#define TTY_DRIVER_DYNAMIC_ALLOC 0x0040
/* tty driver types */
#define TTY_DRIVER_TYPE_SYSTEM 0x0001