mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
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>
This commit is contained in:
parent
16a02081ba
commit
0019b4089c
3 changed files with 15 additions and 15 deletions
|
@ -394,6 +394,11 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
|
|||
* 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.
|
||||
*
|
||||
* TTY_DRIVER_UNNUMBERED_NODE -- do not create numbered /dev nodes. In
|
||||
* other words create /dev/ttyprintk and not /dev/ttyprintk0.
|
||||
* Applicable only when a driver for a single tty device is
|
||||
* being allocated.
|
||||
*/
|
||||
#define TTY_DRIVER_INSTALLED 0x0001
|
||||
#define TTY_DRIVER_RESET_TERMIOS 0x0002
|
||||
|
@ -402,6 +407,7 @@ static inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d)
|
|||
#define TTY_DRIVER_DEVPTS_MEM 0x0010
|
||||
#define TTY_DRIVER_HARDWARE_BREAK 0x0020
|
||||
#define TTY_DRIVER_DYNAMIC_ALLOC 0x0040
|
||||
#define TTY_DRIVER_UNNUMBERED_NODE 0x0080
|
||||
|
||||
/* tty driver types */
|
||||
#define TTY_DRIVER_TYPE_SYSTEM 0x0001
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue