summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-24 18:35:14 +0200
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-24 18:35:14 +0200
commit04e40bdd67afc5ab94d983417f18bb1f20b08eac (patch)
tree6bda889e0ec41b103b98fbfd7ddff078ce3aa79c /drivers/staging
parent[media] vsp1: Fix a sparse warning (diff)
downloadlinux-04e40bdd67afc5ab94d983417f18bb1f20b08eac.tar.xz
linux-04e40bdd67afc5ab94d983417f18bb1f20b08eac.zip
[media] msi3101: Fix compilation on i386
as reported by: kbuild test robot <fengguang.wu@intel.com>: [linuxtv-media:master 459/499] sdr-msi3101.c:undefined reference to `__umoddi3' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/msi3101/sdr-msi3101.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c
index eebe1d042c91..24c7b70a6cbf 100644
--- a/drivers/staging/media/msi3101/sdr-msi3101.c
+++ b/drivers/staging/media/msi3101/sdr-msi3101.c
@@ -40,6 +40,7 @@
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/gcd.h>
+#include <asm/div64.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
@@ -1332,7 +1333,7 @@ static int msi3101_set_tuner(struct msi3101_state *s)
int ret, i, len;
unsigned int n, m, thresh, frac, vco_step, tmp, f_if1;
u32 reg;
- u64 f_vco;
+ u64 f_vco, tmp64;
u8 mode, filter_mode, lo_div;
const struct msi3101_gain *gain_lut;
static const struct {
@@ -1436,8 +1437,10 @@ static int msi3101_set_tuner(struct msi3101_state *s)
#define F_OUT_STEP 1
#define R_REF 4
f_vco = (f_rf + f_if + f_if1) * lo_div;
- n = f_vco / (F_REF * R_REF);
- m = f_vco % (F_REF * R_REF);
+
+ tmp64 = f_vco;
+ m = do_div(tmp64, F_REF * R_REF);
+ n = (unsigned int) tmp64;
vco_step = F_OUT_STEP * lo_div;
thresh = (F_REF * R_REF) / vco_step;