patch-2.1.124 linux/drivers/video/macmodes.c

Next file: linux/drivers/video/macmodes.h
Previous file: linux/drivers/video/macfb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.123/linux/drivers/video/macmodes.c linux/drivers/video/macmodes.c
@@ -12,7 +12,7 @@
 #include <linux/fb.h>
 #include <linux/string.h>
 
-#include "macmodes.h"
+#include <video/macmodes.h>
 
 struct mac_mode {
     int number;
@@ -348,7 +348,7 @@
 int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode,
 		     int *cmode)
 {
-    int i = 0;
+    unsigned int i;
 
     if (var->bits_per_pixel <= 8)
 	*cmode = CMODE_8;
@@ -367,7 +367,7 @@
 	    continue;
 	if (var->pixclock > mode->pixclock)
 	    continue;
-	if (var->vmode != mode->vmode)
+	if ((var->vmode & FB_VMODE_MASK) != mode->vmode)
 	    continue;
 	*vmode = mode->number;
 	return 0;

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