intelfb: add vsync interrupt support
[safe/jmp/linux-2.6] / drivers / video / neofb.c
index a2e201d..24b12f7 100644 (file)
@@ -165,20 +165,20 @@ static int neoFindMode(int xres, int yres, int depth)
 
        switch (depth) {
        case 8:
-               size = sizeof(bios8) / sizeof(biosMode);
+               size = ARRAY_SIZE(bios8);
                mode = bios8;
                break;
        case 16:
-               size = sizeof(bios16) / sizeof(biosMode);
+               size = ARRAY_SIZE(bios16);
                mode = bios16;
                break;
        case 24:
-               size = sizeof(bios24) / sizeof(biosMode);
+               size = ARRAY_SIZE(bios24);
                mode = bios24;
                break;
 #ifdef NO_32BIT_SUPPORT_YET
        case 32:
-               size = sizeof(bios32) / sizeof(biosMode);
+               size = ARRAY_SIZE(bios32);
                mode = bios32;
                break;
 #endif
@@ -486,10 +486,8 @@ static void vgaHWRestore(const struct fb_info *info,
 static inline int neo2200_sync(struct fb_info *info)
 {
        struct neofb_par *par = info->par;
-       int waitcycles;
 
-       while (readl(&par->neo2200->bltStat) & 1)
-               waitcycles++;
+       while (readl(&par->neo2200->bltStat) & 1);
        return 0;
 }