Skip to contentSkip to conversation

drivers/char/tty_io.c: remove console_use_vt

PATCH In review Adrian Bunk 2 participants 3 messages Jan 31, 2005 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/char/tty_io.c: remove console_use_vt

The global variable console_use_vt never changed its' value.

---

 drivers/char/tty_io.c |   24 ++++++++++--------------
 1 files changed, 10 insertions(+), 14 deletions(-)
drivers/char/tty_io.c renamed from drivers/char/tty_io.c.old +10 -14
@@ -131,8 +131,6 @@
    vt.c for deeply disgusting hack reasons */
 DECLARE_MUTEX(tty_sem);
 
-int console_use_vt = 1;
-
 #ifdef CONFIG_UNIX98_PTYS
 extern struct tty_driver *ptm_driver;	/* Unix98 pty masters; for /dev/ptmx */
 extern int pty_limit;		/* Config limit on Unix98 ptys */
@@ -2962,19 +2960,17 @@
 #endif
 
 #ifdef CONFIG_VT
-	if (console_use_vt) {
-		cdev_init(&vc0_cdev, &console_fops);
-		if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
-		    register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1,
-					   "/dev/vc/0") < 0)
-			panic("Couldn't register /dev/tty0 driver\n");
-		devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR,
-			      "vc/0");
-		class_simple_device_add(tty_class, MKDEV(TTY_MAJOR, 0), NULL,
-					"tty0");
+	cdev_init(&vc0_cdev, &console_fops);
+	if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
+	    register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1,
+				   "/dev/vc/0") < 0)
+		panic("Couldn't register /dev/tty0 driver\n");
+	devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR,
+		      "vc/0");
+	class_simple_device_add(tty_class, MKDEV(TTY_MAJOR, 0), NULL,
+				"tty0");
 
-		vty_init();
-	}
+	vty_init();
 #endif
 	return 0;
 }
#1 lore raw
Quoted 1 line · Adrian Bunk

The global variable console_use_vt never changed its' value.

I think that comes from xen.

#2 lore raw
Quoted 5 lines · Olaf Hering
Quoted 1 line · Adrian Bunk

The global variable console_use_vt never changed its' value.

I think that comes from xen.

Ah thanks, I somehow missed that.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed