aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty_driver.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-08 16:26:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 19:45:38 -0400
commit0019b4089ccef8148d8be83cc8adfc81a75b47d4 (patch)
tree4db275fb4c29f9e7f2da85f136dc9f733b26d3eb /include/linux/tty_driver.h
parent16a02081baa15becdb7d6460659e7832e6524d93 (diff)
TTY: add support for unnumbered device nodes
This allows drivers like ttyprintk to avoid hacks to create an unnumbered node in /dev. It used to set TTY_DRIVER_DYNAMIC_DEV in flags and call device_create on its own. That is incorrect, because TTY_DRIVER_DYNAMIC_DEV may be set only if tty_register_device is called explicitly. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 1a85f003d646..44e05b75d573 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -394,6 +394,11 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
394 * TTY_DRIVER_DYNAMIC_ALLOC -- do not allocate structures which are 394 * TTY_DRIVER_DYNAMIC_ALLOC -- do not allocate structures which are
395 * needed per line for this driver as it would waste memory. 395 * needed per line for this driver as it would waste memory.
396 * The driver will take care. 396 * The driver will take care.
397 *
398 * TTY_DRIVER_UNNUMBERED_NODE -- do not create numbered /dev nodes. In
399 * other words create /dev/ttyprintk and not /dev/ttyprintk0.
400 * Applicable only when a driver for a single tty device is
401 * being allocated.
397 */ 402 */
398#define TTY_DRIVER_INSTALLED 0x0001 403#define TTY_DRIVER_INSTALLED 0x0001
399#define TTY_DRIVER_RESET_TERMIOS 0x0002 404#define TTY_DRIVER_RESET_TERMIOS 0x0002
@@ -402,6 +407,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
402#define TTY_DRIVER_DEVPTS_MEM 0x0010 407#define TTY_DRIVER_DEVPTS_MEM 0x0010
403#define TTY_DRIVER_HARDWARE_BREAK 0x0020 408#define TTY_DRIVER_HARDWARE_BREAK 0x0020
404#define TTY_DRIVER_DYNAMIC_ALLOC 0x0040 409#define TTY_DRIVER_DYNAMIC_ALLOC 0x0040
410#define TTY_DRIVER_UNNUMBERED_NODE 0x0080
405 411
406/* tty driver types */ 412/* tty driver types */
407#define TTY_DRIVER_TYPE_SYSTEM 0x0001 413#define TTY_DRIVER_TYPE_SYSTEM 0x0001