summaryrefslogtreecommitdiff
path: root/drivers/staging/sm7xxfb
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2015-06-17 16:54:41 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-17 21:44:29 -0700
commit7caf463de827a09430e4657e6b9d05fd5568e9dc (patch)
tree8df1d047da31f5b9d3974a9a7265e81411be0576 /drivers/staging/sm7xxfb
parent9d91928c9d70e86635cf34ad11024142f9f73dfc (diff)
staging: sm7xxfb: remove numvgamodes
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>
Diffstat (limited to 'drivers/staging/sm7xxfb')
-rw-r--r--drivers/staging/sm7xxfb/sm7xx.h2
-rw-r--r--drivers/staging/sm7xxfb/sm7xxfb.c2
2 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h
index c5d62534e4a4..4dabda44939a 100644
--- a/drivers/staging/sm7xxfb/sm7xx.h
+++ b/drivers/staging/sm7xxfb/sm7xx.h
@@ -775,5 +775,3 @@ static struct ModeInit vgamode[] = {
},
},
};
-
-#define numvgamodes ARRAY_SIZE(vgamode)
diff --git a/drivers/staging/sm7xxfb/sm7xxfb.c b/drivers/staging/sm7xxfb/sm7xxfb.c
index 4d9b69d26166..5667fbf584a7 100644
--- a/drivers/staging/sm7xxfb/sm7xxfb.c
+++ b/drivers/staging/sm7xxfb/sm7xxfb.c
@@ -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 &&