From: James Simmons <jsimmons@infradead.org>

This patch removes the redundent calculation of p->vrows.  This is done in
fbcon_resize.


---

 25-akpm/drivers/video/console/fbcon.c |   19 ++-----------------
 1 files changed, 2 insertions(+), 17 deletions(-)

diff -puN drivers/video/console/fbcon.c~fbdev-redundant-prows-calculation-removal drivers/video/console/fbcon.c
--- 25/drivers/video/console/fbcon.c~fbdev-redundant-prows-calculation-removal	Tue Apr 20 14:37:59 2004
+++ 25-akpm/drivers/video/console/fbcon.c	Tue Apr 20 14:37:59 2004
@@ -749,14 +749,6 @@ static void fbcon_set_display(struct vc_
 		vc->vc_cols = nr_cols;
 		vc->vc_rows = nr_rows;
 	}
-	p->vrows = info->var.yres_virtual / vc->vc_font.height;
-	if(info->var.yres > (vc->vc_font.height * (vc->vc_rows + 1))) {
-		p->vrows -= (info->var.yres - (vc->vc_font.height * vc->vc_rows)) / vc->vc_font.height;
-	}
-	if ((info->var.yres % vc->vc_font.height) &&
-	    (info->var.yres_virtual % vc->vc_font.height <
-	     info->var.yres % vc->vc_font.height))
-		p->vrows--;
 	vc->vc_can_do_color = info->var.bits_per_pixel != 1;
 	vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800;
 	if (charcnt == 256) {
@@ -1567,6 +1559,8 @@ static int fbcon_resize(struct vc_data *
 	p->vrows = var.yres_virtual/fh;
 	if (var.yres > (fh * (height + 1)))
 		p->vrows -= (var.yres - (fh * height)) / fh;
+	if ((var.yres % fh) && (var.yres_virtual % fh < var.yres % fh))
+		p->vrows--;
 	return 0;
 }
 
@@ -1836,15 +1830,6 @@ static int fbcon_do_set_font(struct vc_d
 	if (resize) {
 		/* reset wrap/pan */
 		info->var.xoffset = info->var.yoffset = p->yscroll = 0;
-		p->vrows = info->var.yres_virtual / h;
-
-#if 0          /* INCOMPLETE - let the console gurus handle this */
-		if(info->var.yres > (h * (vc->vc_rows + 1))
-			p->vrows -= (info->var.yres - (h * vc->vc_rows)) / h;
-#endif
-		if ((info->var.yres % h)
-		    && (info->var.yres_virtual % h < info->var.yres % h))
-			p->vrows--;
 		updatescrollmode(p, vc);
 		vc_resize(vc->vc_num, info->var.xres / w, info->var.yres / h);
 		if (CON_IS_VISIBLE(vc) && softback_buf) {

_