X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fvideo%2Fneofb.c;h=24b12f71d5a83d78aa73632b772a41b5453b9fd4;hb=308af9290ad1844c1b4e93ff4919f8009efbe018;hp=a2e201dc40f774a57976d1b41201cfb9aa574031;hpb=7b875affd49fbc8978a1a898a0a80ebfff11f8c6;p=powerpc.git diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c index a2e201dc40..24b12f71d5 100644 --- a/drivers/video/neofb.c +++ b/drivers/video/neofb.c @@ -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; }