patch-2.4.23 linux-2.4.23/drivers/video/aty128fb.c

Next file: linux-2.4.23/drivers/video/fbcmap.c
Previous file: linux-2.4.23/drivers/video/aty/mach64_gx.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/video/aty128fb.c linux-2.4.23/drivers/video/aty128fb.c
@@ -2134,9 +2134,12 @@
 	char *rom_base;
 	char *rom;
 	int  stage;
-	int  i;
+	int  i,j;
 	char aty_rom_sig[] = "761295520";   /* ATI ROM Signature      */
-	char R128_sig[] = "R128";           /* Rage128 ROM identifier */
+	char *R128_sig[] = {
+		"R128",			/* Rage128 ROM identifier */
+		"128b"
+	};
 
 	for (segstart=0x000c0000; segstart<0x000f0000; segstart+=0x00001000) {
         	stage = 1;
@@ -2167,10 +2170,14 @@
 
 		/* ATI signature found.  Let's see if it's a Rage128 */
 		for (i = 0; (i < 512) && (stage != 4); i++) {
-			if (R128_sig[0] == *rom)
-				if (strncmp(R128_sig, rom, 
-						strlen(R128_sig)) == 0)
-					stage = 4;
+		    for(j = 0;j < sizeof(R128_sig)/sizeof(char *);j++) {
+			if (R128_sig[j][0] == *rom)
+				if (strncmp(R128_sig[j], rom, 
+					    strlen(R128_sig[j])) == 0) {
+					      stage = 4;
+					      break;
+					    }
+		    }
 			rom++;
 		}
 		if (stage != 4) {

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