aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/video_cs5530.c
diff options
context:
space:
mode:
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 d3764acf8443..649c3943d431 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[] = {
69 { 4310, 0x2FB1B802, }, /* 232.0000 */ 69 { 4310, 0x2FB1B802, }, /* 232.0000 */
70}; 70};
71 71
72#define NUM_CS5530_FREQUENCIES sizeof(cs5530_pll_table)/sizeof(struct cs5530_pll_entry)
73
74static void cs5530_set_dclk_frequency(struct fb_info *info) 72static void cs5530_set_dclk_frequency(struct fb_info *info)
75{ 73{
76 struct geodefb_par *par = info->par; 74 struct geodefb_par *par = info->par;
@@ -82,7 +80,7 @@ static void cs5530_set_dclk_frequency(struct fb_info *info)
82 value = cs5530_pll_table[0].pll_value; 80 value = cs5530_pll_table[0].pll_value;
83 min = cs5530_pll_table[0].pixclock - info->var.pixclock; 81 min = cs5530_pll_table[0].pixclock - info->var.pixclock;
84 if (min < 0) min = -min; 82 if (min < 0) min = -min;
85 for (i = 1; i < NUM_CS5530_FREQUENCIES; i++) { 83 for (i = 1; i < ARRAY_SIZE(cs5530_pll_table); i++) {
86 diff = cs5530_pll_table[i].pixclock - info->var.pixclock; 84 diff = cs5530_pll_table[i].pixclock - info->var.pixclock;
87 if (diff < 0L) diff = -diff; 85 if (diff < 0L) diff = -diff;
88 if (diff < min) { 86 if (diff < min) {