From 7a3563013a944a9c2ae73298a1352d5456df3cbd Mon Sep 17 00:00:00 2001
From: James Simmons <jsimmons@heisenberg.transvirtual.com>
Date: Tue, 4 Jun 2002 01:19:09 -0700
Subject: [PATCH] Bug fixes for the fbdev layer.

---
 drivers/video/Config.in   | 6 +++---
 drivers/video/Makefile    | 5 -----
 drivers/video/cfbimgblt.c | 5 ++---
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/video/Config.in b/drivers/video/Config.in
index 5cce79de6f91..9a106fbce63e 100644
--- a/drivers/video/Config.in
+++ b/drivers/video/Config.in
@@ -368,9 +368,9 @@ if [ "$CONFIG_FB" = "y" ]; then
 	   "$CONFIG_FB_HP300" = "y" -o "$CONFIG_FB_Q40" = "y" -o \
 	   "$CONFIG_FB_ANAKIN" = "y" -o "$CONFIG_FB_G364" = "y" -o \
 	   "$CONFIG_FB_VIRTUAL" = "y" -o "$CONFIG_FB_CLPS711X" = "y" -o \
-	   "$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_APOLLO" = "y" -o \
-	   "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \ 
-	   "$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_TX3912" = "y" ]; then
+	   "$CONFIG_FB_PMAG_BA" = "y" -o "$CONFIG_FB_PMAGB_B" = "y" -o \
+	   "$CONFIG_FB_3DFX" = "y" -o "$CONFIG_FB_TX3912" = "y" -o \
+	   "$CONFIG_FB_MAXINE" = "y" -o "$CONFIG_FB_APOLLO" = "y" ]; then
 	 define_tristate CONFIG_FBCON_ACCEL y
       else
 	 if [ "$CONFIG_FB_NEOMAGIC" = "m" -o "$CONFIG_FB_HIT" = "m" -o \
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 37d02a638a08..a43c51695f7b 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -15,11 +15,6 @@ export-objs    	:= fbmem.o fbcmap.o fbcon.o fbmon.o modedb.o \
 		   fbcon-cfb8.o fbcon-mac.o fbcon-mfb.o \
 		   cyber2000fb.o sa1100fb.o fbcon-hga.o fbgen.o
 
-obj-y		:=
-obj-m		:=
-obj-n		:=
-obj-		:=
-
 # Each configuration option enables a list of files.
 
 obj-$(CONFIG_DUMMY_CONSOLE)       += dummycon.o
diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c
index 9f68bd324f52..eb2102b05340 100644
--- a/drivers/video/cfbimgblt.c
+++ b/drivers/video/cfbimgblt.c
@@ -107,10 +107,9 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
 				dst++;
 			}
 		
-			if (n) {	
+			if (n) {
+				end_mask = 0;	
 				for (j = n; j > 0; j--) {
-					end_mask = 0;
-	
 					if (test_bit(l, src))
 						end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1)));
 					l--;
-- 
2.30.9