diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/tuners/fc2580.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c index dacf85578c4b..aff39ae457a0 100644 --- a/drivers/media/tuners/fc2580.c +++ b/drivers/media/tuners/fc2580.c | |||
@@ -168,8 +168,7 @@ static int fc2580_set_params(struct dvb_frontend *fe) | |||
168 | } | 168 | } |
169 | 169 | ||
170 | f_ref = 2UL * priv->cfg->clock / r_val; | 170 | f_ref = 2UL * priv->cfg->clock / r_val; |
171 | n_val = f_vco / f_ref; | 171 | n_val = div_u64_rem(f_vco, f_ref, &k_val); |
172 | k_val = f_vco % f_ref; | ||
173 | k_val_reg = 1UL * k_val * (1 << 20) / f_ref; | 172 | k_val_reg = 1UL * k_val * (1 << 20) / f_ref; |
174 | 173 | ||
175 | ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff)); | 174 | ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff)); |