]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] hvc_console: Statically initialize the vtermnos array
authorMilton Miller <miltonm@bga.com>
Fri, 8 Jul 2005 00:56:22 +0000 (17:56 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 8 Jul 2005 01:23:39 +0000 (18:23 -0700)
Statically initialize the vtermnos array.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/hvc_console.c

index fd753250425234733667fd478f10be2b3b934eb0..de849f571ea221f6f291964bde134a6a0a8f5493 100644 (file)
@@ -144,8 +144,8 @@ struct hvc_struct *hvc_get_by_index(int index)
  * console interfaces but can still be used as a tty device.  This has to be
  * static because kmalloc will not work during early console init.
  */
-static uint32_t vtermnos[MAX_NR_HVC_CONSOLES];
-
+static uint32_t vtermnos[MAX_NR_HVC_CONSOLES] =
+       {[0 ... MAX_NR_HVC_CONSOLES - 1] = -1};
 
 /*
  * Console APIs, NOT TTY.  These APIs are available immediately when
@@ -213,10 +213,6 @@ struct console hvc_con_driver = {
 /* Early console initialization.  Preceeds driver initialization. */
 static int __init hvc_console_init(void)
 {
-       int i;
-
-       for (i=0; i<MAX_NR_HVC_CONSOLES; i++)
-               vtermnos[i] = -1;
        hvc_find_vtys();
        register_console(&hvc_con_driver);
        return 0;