patch-2.1.4 linux/drivers/char/vga.c

Next file: linux/drivers/char/vt.c
Previous file: linux/drivers/char/vesa_blank.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/drivers/char/vga.c linux/drivers/char/vga.c
@@ -391,8 +391,11 @@
 	if (arg)
 	  {
 	    if (set)
-	      for (i=0; i<cmapsz ; i++)
-		scr_writeb(get_user(arg + i), charmap + i);
+	      for (i=0; i<cmapsz ; i++) {
+	      	char c;
+	      	get_user(c, arg + i);
+		scr_writeb(c, charmap + i);
+	      }
 	    else
 	      for (i=0; i<cmapsz ; i++)
 		put_user(scr_readb(charmap + i), arg + i);
@@ -408,8 +411,11 @@
 		charmap += 2*cmapsz;
 		arg += cmapsz;
 		if (set)
-		  for (i=0; i<cmapsz ; i++)
-		    scr_writeb(get_user(arg+i), charmap+i);
+		  for (i=0; i<cmapsz ; i++) {
+		    char c;
+		    get_user(c, arg+i);
+		    scr_writeb(c, charmap+i);
+		  }
 		else
 		  for (i=0; i<cmapsz ; i++)
 		    put_user(scr_readb(charmap+i), arg+i);
@@ -553,9 +559,9 @@
 
 	for (i=0; i<16; i++) {
 		if (set) {
-			default_red[i] = get_user(arg++) ;
-			default_grn[i] = get_user(arg++) ;
-			default_blu[i] = get_user(arg++) ;
+			get_user(default_red[i], arg++) ;
+			get_user(default_grn[i], arg++) ;
+			get_user(default_blu[i], arg++) ;
 		} else {
 			put_user (default_red[i], arg++) ;
 			put_user (default_grn[i], arg++) ;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov