summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/fc2580.c
diff options
context:
space:
mode:
authorGianluca Gennari <gennarone@gmail.com>2012-09-24 12:37:18 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-01 22:07:06 +0200
commit9dc72160d13c6fdeec57f5c6017588812c4294b6 (patch)
tree93630c7c7db1adfee98d04ec0bc36381a1e57781 /drivers/media/tuners/fc2580.c
parent[media] fc2580: silence uninitialized variable warning (diff)
downloadlinux-9dc72160d13c6fdeec57f5c6017588812c4294b6.tar.xz
linux-9dc72160d13c6fdeec57f5c6017588812c4294b6.zip
[media] fc2580: use macro for 64 bit division and reminder
Fixes the following warnings on a 32 bit system with GCC 4.4.3 and kernel Ubuntu 2.6.32-43 32 bit: WARNING: "__udivdi3" [fc2580.ko] undefined! WARNING: "__umoddi3" [fc2580.ko] undefined! Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/tuners/fc2580.c')
-rw-r--r--drivers/media/tuners/fc2580.c3
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)
}
f_ref = 2UL * priv->cfg->clock / r_val;
- n_val = f_vco / f_ref;
- k_val = f_vco % f_ref;
+ n_val = div_u64_rem(f_vco, f_ref, &k_val);
k_val_reg = 1UL * k_val * (1 << 20) / f_ref;
ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff));