patch-2.4.22 linux-2.4.22/drivers/video/maxinefb.c

Next file: linux-2.4.22/drivers/video/maxinefb.h
Previous file: linux-2.4.22/drivers/video/matrox/matroxfb_misc.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/video/maxinefb.c linux-2.4.22/drivers/video/maxinefb.c
@@ -81,9 +81,6 @@
 static int currcon = 0;
 static struct maxinefb_par current_par;
 
-/* Reference to machine type set in arch/mips/dec/prom/identify.c, KM */
-extern unsigned long mips_machtype;
-
 
 /* Handle the funny Inmos RamDAC/video controller ... */
 
@@ -123,6 +120,15 @@
 	var->yoffset = 0;
 	var->bits_per_pixel = 8;
 	var->grayscale = 0;
+	var->red.offset = 0;
+	var->red.length = 8;
+	var->red.msb_right = 0;
+	var->green.offset = 0;
+	var->green.length = 8;
+	var->green.msb_right = 0;
+	var->blue.offset = 0;
+	var->blue.length = 8;
+	var->blue.msb_right = 0;
 	var->transp.offset = 0;
 	var->transp.length = 0;
 	var->transp.msb_right = 0;
@@ -253,7 +259,7 @@
 	strcpy(fix->id, "maxinefb");
 	/* fix->id is a char[16], so a maximum of 15 characters, KM */
 
-	fix->smem_start = (char *) fb_start;	/* display memory base address, KM */
+	fix->smem_start = fb_start;	/* display memory base address, KM */
 	fix->smem_len = fb_size;
 	fix->type = FB_TYPE_PACKED_PIXELS;
 	fix->visual = FB_VISUAL_PSEUDOCOLOR;
@@ -291,7 +297,7 @@
 
 	maxinefb_get_fix(&fix, con, 0);
 
-	display->screen_base = fix.smem_start;
+	display->screen_base = (char *)fix.smem_start;
 	display->visual = fix.visual;
 	display->type = fix.type;
 	display->type_aux = fix.type_aux;
@@ -316,7 +322,7 @@
 
 int __init maxinefb_init(void)
 {
-	volatile unsigned char *fboff;
+	unsigned long fboff;
 	int i;
 
 	/* Validate we're on the proper machine type */
@@ -332,7 +338,7 @@
 
 	/* Clear screen */
 	for (fboff = fb_start; fboff < fb_start + 0x1ffff; fboff++)
-		*fboff = 0x0;
+		*(volatile unsigned char *)fboff = 0x0;
 
 	/* erase hardware cursor */
 	for (i = 0; i < 512; i++) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)