summaryrefslogtreecommitdiff
path: root/src/smi_501.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-03 15:10:55 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-03 15:10:55 -0300
commitbacddd1d31a5f3de14477914958f27b6f081c125 (patch)
treed07176b2db39080f83fa3696d0b40a7ac97c7a5c /src/smi_501.c
parent22a7fd6711e2a40633981cd21fa3808c9246f13a (diff)
Rename macro "bitfield" to "bits" and correct a wrong division.
Diffstat (limited to 'src/smi_501.c')
-rw-r--r--src/smi_501.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/smi_501.c b/src/smi_501.c
index 19f6368..17239b2 100644
--- a/src/smi_501.c
+++ b/src/smi_501.c
@@ -682,7 +682,7 @@ SMI501_FindPLLClock(double clock, int32_t *m, int32_t *n, int32_t *xclck)
best = 0x7fffffff;
for (N = 2; N <= 24; N++) {
for (K = 1; K <= 2; K++) {
- M = (clock * K) * N / 24 / 1000.0;
+ M = clock * K * N / 24 / 1000.0;
diff = (24 * 1000.0 * M / N) - (clock * K);
/* Ensure M is larger then 0 and fits in 7 bits */
if (M > 0 && M < 0x80 && fabs(diff) < best) {