Skip to content

Commit

Permalink
[PATCH] hvc_console: Statically initialize the vtermnos array
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Milton Miller authored and Linus Torvalds committed Jul 8, 2005
1 parent 5f6d9c0 commit 64e4da5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 64e4da5

Please sign in to comment.