[PATCH] tty: fill console_driver->driver_name

From: Cheng Chao
Date: Wed Nov 06 2019 - 20:28:26 EST


cat /proc/tty/drivers
...
unknown /dev/tty 4 1-63 console

----------------------------------
after this patch:

cat /proc/tty/drivers
...
console /dev/tty 4 1-63 console

Signed-off-by: Cheng Chao <cs.os.kernel@xxxxxxxxx>
---
drivers/tty/vt/vt.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 34aa39d..981eee9 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3440,6 +3440,7 @@ int __init vty_init(const struct file_operations *console_fops)
if (!console_driver)
panic("Couldn't allocate console driver\n");

+ console_driver->driver_name = "console";
console_driver->name = "tty";
console_driver->name_base = 1;
console_driver->major = TTY_MAJOR;
--
2.4.11