diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 21:43:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 21:43:23 -0300 |
commit | a6b6e4a50a6e773ced47026223985ff1322b9a8e (patch) | |
tree | df6dbda2c971d35081fd7ac4ecb957d6d48ac0d3 /linux/drivers/media/dvb/frontends | |
parent | f59631ff68e0158405b038c3f2008a2d6ef49191 (diff) | |
download | mediapointer-dvb-s2-a6b6e4a50a6e773ced47026223985ff1322b9a8e.tar.gz mediapointer-dvb-s2-a6b6e4a50a6e773ced47026223985ff1322b9a8e.tar.bz2 |
drx397xD: fix math usage
From: Mauro Carvalho Chehab <mchehab@infradead.org>
The previous code were using a div64 math specific to i386. Replace for an
asm-generic one.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r-- | linux/drivers/media/dvb/frontends/drx397xD.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/frontends/drx397xD.c b/linux/drivers/media/dvb/frontends/drx397xD.c index 9dd8b22aa..319a6b541 100644 --- a/linux/drivers/media/dvb/frontends/drx397xD.c +++ b/linux/drivers/media/dvb/frontends/drx397xD.c @@ -26,6 +26,7 @@ #include <linux/delay.h> #include <linux/string.h> #include <linux/firmware.h> +#include <asm/div64.h> #include "dvb_frontend.h" #include "drx397xD.h" @@ -1060,17 +1061,15 @@ static int drx_tune(struct drx397xD_state *s, rc = WR16(s, 0x0820050, rc); { - long dummy; - /* Configure bandwidth specific factor */ - ebx = div_ll_X_l_rem(((u64) (s->f_osc) << 21) + (ebx >> 1), - ebx, &dummy) - 0x800000; + ebx = div64_64(((u64) (s->f_osc) << 21) + (ebx >> 1), + (u64)ebx) - 0x800000; EXIT_RC(WR16(s, 0x0c50010, ebx & 0xffff)); EXIT_RC(WR16(s, 0x0c50011, ebx >> 16)); /* drx397xD oscillator calibration */ - ebx = div_ll_X_l_rem(((u64) (s->config.f_if + df_tuner) << 28) + - (s->f_osc >> 1), s->f_osc, &dummy); + ebx = div64_64(((u64) (s->config.f_if + df_tuner) << 28) + + (s->f_osc >> 1), (u64)s->f_osc); } ebx &= 0xfffffff; if (fep->inversion == INVERSION_ON) |