summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2009-05-28 12:50:36 -0400
committerMichael Krufky <mkrufky@kernellabs.com>2009-05-28 12:50:36 -0400
commit0291002e9dcce64956346325ef3c35478c6c95b5 (patch)
treeea9e827502c03612dac97475bd5eb29000983c80
parent1340daf098275689f8220222447a84e4ec4263b6 (diff)
downloadmediapointer-dvb-s2-0291002e9dcce64956346325ef3c35478c6c95b5.tar.gz
mediapointer-dvb-s2-0291002e9dcce64956346325ef3c35478c6c95b5.tar.bz2
lgdt3305: fix 64bit division in function lgdt3305_set_if
From: Michael Krufky <mkrufky@kernellabs.com> Priority: high Signed-off-by: Michael Krufky <kernellabs.com>
-rw-r--r--linux/drivers/media/dvb/frontends/lgdt3305.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/linux/drivers/media/dvb/frontends/lgdt3305.c b/linux/drivers/media/dvb/frontends/lgdt3305.c
index f0c0c8199..b16410c64 100644
--- a/linux/drivers/media/dvb/frontends/lgdt3305.c
+++ b/linux/drivers/media/dvb/frontends/lgdt3305.c
@@ -19,6 +19,7 @@
*
*/
+#include <asm/div64.h>
#include "compat.h"
#include <linux/dvb/frontend.h>
#include "dvb_math.h"
@@ -497,27 +498,15 @@ static int lgdt3305_set_if(struct lgdt3305_state *state,
nco = if_freq_khz / 10;
-#define LGDT3305_64BIT_DIVISION_ENABLED 0
- /* FIXME: 64bit division disabled to avoid linking error:
- * WARNING: "__udivdi3" [lgdt3305.ko] undefined!
- */
switch (param->u.vsb.modulation) {
case VSB_8:
-#if LGDT3305_64BIT_DIVISION_ENABLED
nco <<= 24;
- nco /= 625;
-#else
- nco *= ((1 << 24) / 625);
-#endif
+ do_div(nco, 625);
break;
case QAM_64:
case QAM_256:
-#if LGDT3305_64BIT_DIVISION_ENABLED
nco <<= 28;
- nco /= 625;
-#else
- nco *= ((1 << 28) / 625);
-#endif
+ do_div(nco, 625);
break;
default:
return -EINVAL;