Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187163
b: refs/heads/master
c: 0d3580d
h: refs/heads/master
i:
  187161: c1901a2
  187159: 8a9b5d4
v: v3
  • Loading branch information
Roel Kluin authored and Linus Torvalds committed Mar 12, 2010
1 parent 67e931e commit bb033f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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: 6e3e37a5a7c91045497553bcbd6a5faea98b21b3
refs/heads/master: 0d3580d40cc38bbaf63d0b2756931e0ae241a9ea
4 changes: 2 additions & 2 deletions trunk/drivers/video/asiliantfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static void asiliant_calc_dclk2(u32 *ppixclock, u8 *dclk2_m, u8 *dclk2_n, u8 *dc

/* 3 <= m <= 257 */
if (m >= 3 && m <= 257) {
unsigned new_error = ((Ftarget * n) - (Fref * m)) >= 0 ?
unsigned new_error = Ftarget * n >= Fref * m ?
((Ftarget * n) - (Fref * m)) : ((Fref * m) - (Ftarget * n));
if (new_error < best_error) {
best_n = n;
Expand All @@ -152,7 +152,7 @@ static void asiliant_calc_dclk2(u32 *ppixclock, u8 *dclk2_m, u8 *dclk2_n, u8 *dc
else if (m <= 1028) {
/* remember there are still only 8-bits of precision in m, so
* avoid over-optimistic error calculations */
unsigned new_error = ((Ftarget * n) - (Fref * (m & ~3))) >= 0 ?
unsigned new_error = Ftarget * n >= Fref * (m & ~3) ?
((Ftarget * n) - (Fref * (m & ~3))) : ((Fref * (m & ~3)) - (Ftarget * n));
if (new_error < best_error) {
best_n = n;
Expand Down

0 comments on commit bb033f6

Please sign in to comment.