Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105528
b: refs/heads/master
c: 816664f
h: refs/heads/master
v: v3
  • Loading branch information
Roel Kluin authored and Linus Torvalds committed Jul 24, 2008
1 parent d649a75 commit 252e331
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcea8030b3c2e71ad89f080901c63a04f07881c8
refs/heads/master: 816664f88707b03fde24fb09759d569ed42406cb
6 changes: 2 additions & 4 deletions trunk/drivers/video/aty/aty128fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,18 +1339,16 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
if (vclk * 12 < c.ppll_min)
vclk = c.ppll_min/12;

pll->post_divider = -1;

/* now, find an acceptable divider */
for (i = 0; i < sizeof(post_dividers); i++) {
for (i = 0; i < ARRAY_SIZE(post_dividers); i++) {
output_freq = post_dividers[i] * vclk;
if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) {
pll->post_divider = post_dividers[i];
break;
}
}

if (pll->post_divider < 0)
if (i == ARRAY_SIZE(post_dividers))
return -EINVAL;

/* calculate feedback divider */
Expand Down

0 comments on commit 252e331

Please sign in to comment.