tree 60c86746fa0a489431c2f2b390e050390da1952c
parent 5f6d9c072df162a8601a09e6c63fd0e4f5aecd06
author Milton Miller <[EMAIL PROTECTED]> Fri, 08 Jul 2005 07:56:22 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Fri, 08 Jul 2005 08:23:39 -0700
[PATCH] hvc_console: Statically initialize the vtermnos array
Statically initialize the vtermnos array.
Signed-off-by: Milton Miller <[EMAIL PROTECTED]>
Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
drivers/char/hvc_console.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -144,8 +144,8 @@ struct hvc_struct *hvc_get_by_index(int
* 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;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html