aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/frontends/drx397xD.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/drx397xD.c b/drivers/media/dvb/frontends/drx397xD.c
index b0ff77ffc88b..af4354662124 100644
--- a/drivers/media/dvb/frontends/drx397xD.c
+++ b/drivers/media/dvb/frontends/drx397xD.c
@@ -26,6 +26,7 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/string.h> 27#include <linux/string.h>
28#include <linux/firmware.h> 28#include <linux/firmware.h>
29#include <asm/div64.h>
29 30
30#include "dvb_frontend.h" 31#include "dvb_frontend.h"
31#include "drx397xD.h" 32#include "drx397xD.h"
@@ -1024,17 +1025,15 @@ static int drx_tune(struct drx397xD_state *s,
1024 rc = WR16(s, 0x0820050, rc); 1025 rc = WR16(s, 0x0820050, rc);
1025 1026
1026 { 1027 {
1027 long dummy;
1028
1029 /* Configure bandwidth specific factor */ 1028 /* Configure bandwidth specific factor */
1030 ebx = div_ll_X_l_rem(((u64) (s->f_osc) << 21) + (ebx >> 1), 1029 ebx = div64_64(((u64) (s->f_osc) << 21) + (ebx >> 1),
1031 ebx, &dummy) - 0x800000; 1030 (u64)ebx) - 0x800000;
1032 EXIT_RC(WR16(s, 0x0c50010, ebx & 0xffff)); 1031 EXIT_RC(WR16(s, 0x0c50010, ebx & 0xffff));
1033 EXIT_RC(WR16(s, 0x0c50011, ebx >> 16)); 1032 EXIT_RC(WR16(s, 0x0c50011, ebx >> 16));
1034 1033
1035 /* drx397xD oscillator calibration */ 1034 /* drx397xD oscillator calibration */
1036 ebx = div_ll_X_l_rem(((u64) (s->config.f_if + df_tuner) << 28) + 1035 ebx = div64_64(((u64) (s->config.f_if + df_tuner) << 28) +
1037 (s->f_osc >> 1), s->f_osc, &dummy); 1036 (s->f_osc >> 1), (u64)s->f_osc);
1038 } 1037 }
1039 ebx &= 0xfffffff; 1038 ebx &= 0xfffffff;
1040 if (fep->inversion == INVERSION_ON) 1039 if (fep->inversion == INVERSION_ON)