staging: sm7xxfb: remove numvgamodes
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Wed, 17 Jun 2015 11:24:41 +0000 (16:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Jun 2015 04:44:29 +0000 (21:44 -0700)
numvgamodes was only used in one place, so remove the #define
and use its defined value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm7xxfb/sm7xx.h
drivers/staging/sm7xxfb/sm7xxfb.c

index c5d62534e4a4cebb54f85dc400952e56c122bdec..4dabda44939a6a5f8c0b9b7e3d50a2bd14820d84 100644 (file)
@@ -775,5 +775,3 @@ static struct ModeInit vgamode[] = {
          },
         },
 };
-
-#define numvgamodes            ARRAY_SIZE(vgamode)
index 4d9b69d26166e3c995e8e3d4484ebd16fcc2c911..5667fbf584a7f98677d9888324e48454c54c472b 100644 (file)
@@ -477,7 +477,7 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb)
                "sfb->width=%d sfb->height=%d sfb->fb->var.bits_per_pixel=%d sfb->hz=%d\n",
                sfb->width, sfb->height, sfb->fb->var.bits_per_pixel, sfb->hz);
 
-       for (j = 0; j < numvgamodes; j++) {
+       for (j = 0; j < ARRAY_SIZE(vgamode); j++) {
                if (vgamode[j].mmsizex == sfb->width &&
                    vgamode[j].mmsizey == sfb->height &&
                    vgamode[j].bpp == sfb->fb->var.bits_per_pixel &&