From 64f493298b983974bdf817f1ed781d68fd61774a Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 22 Sep 2009 16:47:53 -0700 Subject: [PATCH] --- yaml --- r: 164887 b: refs/heads/master c: f0c7d2b72ad1a694c0c886a14cc708841181e9bd h: refs/heads/master i: 164885: fe578a711b4054f88dbb0fa76997429617178fac 164883: 3c04654980a09f618d931d031f7d44472cca8ed6 164879: e4a53f6daeceaa31f54b25a6bdb8ad1bf9290ca3 v: v3 --- [refs] | 2 +- trunk/drivers/video/console/vgacon.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 54aa667fabd9..4c098ab0b32b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ddce3fd0acbdc1be684fb5f919ae3d2e9518aac +refs/heads/master: f0c7d2b72ad1a694c0c886a14cc708841181e9bd diff --git a/trunk/drivers/video/console/vgacon.c b/trunk/drivers/video/console/vgacon.c index 74e96cf83b7e..da55ccaf4d55 100644 --- a/trunk/drivers/video/console/vgacon.c +++ b/trunk/drivers/video/console/vgacon.c @@ -589,12 +589,14 @@ static void vgacon_init(struct vc_data *c, int init) static void vgacon_deinit(struct vc_data *c) { - /* When closing the last console, reset video origin */ - if (!--vgacon_uni_pagedir[1]) { + /* When closing the active console, reset video origin */ + if (CON_IS_VISIBLE(c)) { c->vc_visible_origin = vga_vram_base; vga_set_mem_top(c); - con_free_unimap(c); } + + if (!--vgacon_uni_pagedir[1]) + con_free_unimap(c); c->vc_uni_pagedir_loc = &c->vc_uni_pagedir; con_set_default_unimap(c); }