tty: Reserve ldisc 29 for development purposes
authorMax Staudt <max@enpas.org>
Fri, 11 Feb 2022 14:10:36 +0000 (15:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Feb 2022 09:03:21 +0000 (10:03 +0100)
It's handy to have an ldisc number free for out-of-tree testing. This
way, a new ldisc can be developed on any running system, without having
to recompile the kernel just to define a new number.

This is the highest number (and also the last one) available under the
old numbering scheme, so let's reserve it before it's too late.

From now on, every new ldisc upstreamed will have to increment NR_LDISCS
in lockstep with its addition to the table in tty.h.

Signed-off-by: Max Staudt <max@enpas.org>
Link: https://lore.kernel.org/r/20220211141036.6403-1-max@enpas.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/uapi/linux/tty.h

index a58deb3061ebb8448794587ab6e77c738017351c..9d0f06bfbac3e4783dca45b30d98720dfe87f0ae 100644 (file)
@@ -6,8 +6,6 @@
  * 'tty.h' defines some structures used by tty_io.c and some defines.
  */
 
-#define NR_LDISCS              30
-
 /* line disciplines */
 #define N_TTY          0
 #define N_SLIP         1
@@ -39,5 +37,9 @@
 #define N_SPEAKUP      26      /* Speakup communication with synths */
 #define N_NULL         27      /* Null ldisc used for error handling */
 #define N_MCTP         28      /* MCTP-over-serial */
+#define N_DEVELOPMENT  29      /* Manual out-of-tree testing */
+
+/* Always the newest line discipline + 1 */
+#define NR_LDISCS      30
 
 #endif /* _UAPI_LINUX_TTY_H */