aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-08 16:26:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 19:45:38 -0400
commit21aca2fa00259f781d228496631b61dbb4274e90 (patch)
tree825e2b2ce47f55c27948112e89238c2a2a831f48 /include
parent7f0bc6a68ed93f3b4ad77b94df5ef32446c583e3 (diff)
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')
-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 3adc362f0bd..1a85f003d64 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)
391 * the requested timeout to the caller instead of using a simple 391 * the requested timeout to the caller instead of using a simple
392 * on/off interface. 392 * on/off interface.
393 * 393 *
394 * TTY_DRIVER_DYNAMIC_ALLOC -- do not allocate structures which are
395 * needed per line for this driver as it would waste memory.
396 * The driver will take care.
394 */ 397 */
395#define TTY_DRIVER_INSTALLED 0x0001 398#define TTY_DRIVER_INSTALLED 0x0001
396#define TTY_DRIVER_RESET_TERMIOS 0x0002 399#define TTY_DRIVER_RESET_TERMIOS 0x0002
@@ -398,6 +401,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
398#define TTY_DRIVER_DYNAMIC_DEV 0x0008 401#define TTY_DRIVER_DYNAMIC_DEV 0x0008
399#define TTY_DRIVER_DEVPTS_MEM 0x0010 402#define TTY_DRIVER_DEVPTS_MEM 0x0010
400#define TTY_DRIVER_HARDWARE_BREAK 0x0020 403#define TTY_DRIVER_HARDWARE_BREAK 0x0020
404#define TTY_DRIVER_DYNAMIC_ALLOC 0x0040
401 405
402/* tty driver types */ 406/* tty driver types */
403#define TTY_DRIVER_TYPE_SYSTEM 0x0001 407#define TTY_DRIVER_TYPE_SYSTEM 0x0001