summaryrefslogtreecommitdiff
path: root/drivers/video/geode/video_cs5530.c
diff options
context:
space:
mode:
authorDavid Vrabel <dvrabel@arcom.com>2005-09-09 13:04:32 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 13:57:59 -0700
commit53eed4ec8bcd8701b9135859ec46b10a0d88ba25 (patch)
tree50e3fddcc63d536be5babb6e91d54d5c3071c555 /drivers/video/geode/video_cs5530.c
parent4c7ffe0b9f7f40bd818fe3af51342f64c483908e (diff)
downloadlinux-3.10-53eed4ec8bcd8701b9135859ec46b10a0d88ba25.tar.gz
linux-3.10-53eed4ec8bcd8701b9135859ec46b10a0d88ba25.tar.bz2
linux-3.10-53eed4ec8bcd8701b9135859ec46b10a0d88ba25.zip
[PATCH] fbdev: geode updates
Geode framebuffer driver updates: - Local mode list (taken from modedb.c) containing only relevant modes. This also makes the driver work as a module. - Make it a PCI driver (from James Simmons <jsimmons@infradead.org>). - A few other minor cosmetic bits and pieces. Signed-off-by: David Vrabel <dvrabel@arcom.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/geode/video_cs5530.c')
-rw-r--r--drivers/video/geode/video_cs5530.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/geode/video_cs5530.c b/drivers/video/geode/video_cs5530.c
index d3764acf844..649c3943d43 100644
--- a/drivers/video/geode/video_cs5530.c
+++ b/drivers/video/geode/video_cs5530.c
@@ -69,8 +69,6 @@ static const struct cs5530_pll_entry cs5530_pll_table[] = {
{ 4310, 0x2FB1B802, }, /* 232.0000 */
};
-#define NUM_CS5530_FREQUENCIES sizeof(cs5530_pll_table)/sizeof(struct cs5530_pll_entry)
-
static void cs5530_set_dclk_frequency(struct fb_info *info)
{
struct geodefb_par *par = info->par;
@@ -82,7 +80,7 @@ static void cs5530_set_dclk_frequency(struct fb_info *info)
value = cs5530_pll_table[0].pll_value;
min = cs5530_pll_table[0].pixclock - info->var.pixclock;
if (min < 0) min = -min;
- for (i = 1; i < NUM_CS5530_FREQUENCIES; i++) {
+ for (i = 1; i < ARRAY_SIZE(cs5530_pll_table); i++) {
diff = cs5530_pll_table[i].pixclock - info->var.pixclock;
if (diff < 0L) diff = -diff;
if (diff < min) {