ddi_compute_wrpll: Do not use a double constant

Otherwise the expression will be promoted to a floating point
multiplication

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau 2013-05-10 13:41:32 +01:00
parent 3b79360642
commit eab0823e0e

View File

@ -131,8 +131,8 @@ static void wrpll_update_rnp(uint64_t freq2k, unsigned budget,
diff = ABS_DIFF((freq2k * p * r2), (LC_FREQ_2K * n2));
diff_best = ABS_DIFF((freq2k * best->p * best->r2),
(LC_FREQ_2K * best->n2));
c = 1e6 * diff;
d = 1e6 * diff_best;
c = 1000000 * diff;
d = 1000000 * diff_best;
if (a < c && b < d) {
/* If both are above the budget, pick the closer */