diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/asiliantfb.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/asiliantfb.c')
-rw-r--r-- | drivers/video/asiliantfb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index 9fe90ce928fb..8cdf88e20b4b 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/string.h> | 35 | #include <linux/string.h> |
36 | #include <linux/mm.h> | 36 | #include <linux/mm.h> |
37 | #include <linux/slab.h> | ||
38 | #include <linux/vmalloc.h> | 37 | #include <linux/vmalloc.h> |
39 | #include <linux/delay.h> | 38 | #include <linux/delay.h> |
40 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
@@ -140,7 +139,7 @@ static void asiliant_calc_dclk2(u32 *ppixclock, u8 *dclk2_m, u8 *dclk2_n, u8 *dc | |||
140 | 139 | ||
141 | /* 3 <= m <= 257 */ | 140 | /* 3 <= m <= 257 */ |
142 | if (m >= 3 && m <= 257) { | 141 | if (m >= 3 && m <= 257) { |
143 | unsigned new_error = ((Ftarget * n) - (Fref * m)) >= 0 ? | 142 | unsigned new_error = Ftarget * n >= Fref * m ? |
144 | ((Ftarget * n) - (Fref * m)) : ((Fref * m) - (Ftarget * n)); | 143 | ((Ftarget * n) - (Fref * m)) : ((Fref * m) - (Ftarget * n)); |
145 | if (new_error < best_error) { | 144 | if (new_error < best_error) { |
146 | best_n = n; | 145 | best_n = n; |
@@ -152,7 +151,7 @@ static void asiliant_calc_dclk2(u32 *ppixclock, u8 *dclk2_m, u8 *dclk2_n, u8 *dc | |||
152 | else if (m <= 1028) { | 151 | else if (m <= 1028) { |
153 | /* remember there are still only 8-bits of precision in m, so | 152 | /* remember there are still only 8-bits of precision in m, so |
154 | * avoid over-optimistic error calculations */ | 153 | * avoid over-optimistic error calculations */ |
155 | unsigned new_error = ((Ftarget * n) - (Fref * (m & ~3))) >= 0 ? | 154 | unsigned new_error = Ftarget * n >= Fref * (m & ~3) ? |
156 | ((Ftarget * n) - (Fref * (m & ~3))) : ((Fref * (m & ~3)) - (Ftarget * n)); | 155 | ((Ftarget * n) - (Fref * (m & ~3))) : ((Fref * (m & ~3)) - (Ftarget * n)); |
157 | if (new_error < best_error) { | 156 | if (new_error < best_error) { |
158 | best_n = n; | 157 | best_n = n; |