diff mbox series

[v8,1/4] ttynull: Always initialize console index to -1

Message ID 20250311033133.1859963-2-adamsimonelli@gmail.com
State New
Headers show
Series Optionally allow ttynull to be selected as a default console | expand

Commit Message

Adam Simonelli March 11, 2025, 3:31 a.m. UTC
From: Adam Simonelli <adamsimonelli@gmail.com>

This allows ttynull to be considered in console selection.

Suggested-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Adam Simonelli <adamsimonelli@gmail.com>
---
 drivers/tty/ttynull.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/tty/ttynull.c b/drivers/tty/ttynull.c
index 6b2f7208b564..d8b51edde628 100644
--- a/drivers/tty/ttynull.c
+++ b/drivers/tty/ttynull.c
@@ -57,6 +57,7 @@  static struct tty_driver *ttynull_device(struct console *c, int *index)
 static struct console ttynull_console = {
 	.name = "ttynull",
 	.device = ttynull_device,
+	.index = -1,
 };
 
 static int __init ttynull_init(void)