[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1434540288-8289-3-git-send-email-sudipm.mukherjee@gmail.com>
Date: Wed, 17 Jun 2015 16:54:41 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-fbdev@...r.kernel.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Joe Perches <joe@...ches.com>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH v2 2/9] 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@...torindia.org>
---
drivers/staging/sm7xxfb/sm7xx.h | 2 --
drivers/staging/sm7xxfb/sm7xxfb.c | 2 +-
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h
index c5d6253..4dabda4 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 4d9b69d..5667fbf 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 &&
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists