[BUG 2.6.1] missing 'console_driver' with CONFIG_VT but no CONFIG_VT_CONSOLE

From: Jun Sun
Date: Wed Jan 21 2004 - 18:37:05 EST



See drivers/char/vt.c.

'console_driver' is defined only when CONFIG_VT_CONSOLE is set.
However it is used by vty_init() which is outside the scope
of CONFIG_VT_CONSOLE.

I think the fix is to move console_driver definition outside
CONFIG_VT_CONSOLE. See the attachment. Hopefully someone with
more knowledge on this can validate that.

Jun
diff -Nru drivers/char/vt.c.orig drivers/char/vt.c
--- drivers/char/vt.c.orig Wed Nov 5 14:29:51 2003
+++ drivers/char/vt.c Wed Jan 21 15:27:06 2004
@@ -2086,6 +2086,8 @@
schedule_console_callback();
}

+struct tty_driver *console_driver;
+
#ifdef CONFIG_VT_CONSOLE

/*
@@ -2185,8 +2187,6 @@
clear_bit(0, &printing);
}

-struct tty_driver *console_driver;
-
static struct tty_driver *vt_console_device(struct console *c, int *index)
{
*index = c->index ? c->index-1 : fg_console;