From 88ea12b1f89c456639e65cd1e52c6f20071fd0d8 Mon Sep 17 00:00:00 2001 From: Jeff Buchbinder Date: Mon, 13 Nov 2017 08:01:36 -0500 Subject: [PATCH] Use dynamic major number ( #11 ) --- module/tty0tty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/tty0tty.c b/module/tty0tty.c index f7c19d4..44677b9 100644 --- a/module/tty0tty.c +++ b/module/tty0tty.c @@ -58,9 +58,13 @@ short pairs = 4; //Default number of pairs of devices module_param(pairs, short, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); MODULE_PARM_DESC(pairs, "Number of pairs of devices to be created, maximum of 128"); - +#if 0 #define TTY0TTY_MAJOR 240 /* experimental range */ #define TTY0TTY_MINOR 16 +#else +#define TTY0TTY_MAJOR 0 /* dynamic allocation */ +#define TTY0TTY_MINOR 0 +#endif /* fake UART values */ //out -- libgit2 0.21.4