From: Milton Miller Date: Fri, 8 Jul 2005 00:56:22 +0000 (-0700) Subject: [PATCH] hvc_console: Statically initialize the vtermnos array X-Git-Tag: v2.6.13-rc3~284 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=64e4da57964c03da9a03087a398cade81b7bb496;p=~emulex%2Finfiniband.git [PATCH] hvc_console: Statically initialize the vtermnos array Statically initialize the vtermnos array. Signed-off-by: Milton Miller Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index fd753250425..de849f571ea 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -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