diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-08-24 12:35:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-08-24 12:35:14 -0400 |
commit | 04e40bdd67afc5ab94d983417f18bb1f20b08eac (patch) | |
tree | 6bda889e0ec41b103b98fbfd7ddff078ce3aa79c | |
parent | cbec6d3ab470565536480d3bd109a7fdb128c3c4 (diff) |
[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>
-rw-r--r-- | drivers/staging/media/msi3101/sdr-msi3101.c | 9 |
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 @@ | |||
40 | #include <linux/module.h> | 40 | #include <linux/module.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <linux/gcd.h> | 42 | #include <linux/gcd.h> |
43 | #include <asm/div64.h> | ||
43 | #include <media/v4l2-device.h> | 44 | #include <media/v4l2-device.h> |
44 | #include <media/v4l2-ioctl.h> | 45 | #include <media/v4l2-ioctl.h> |
45 | #include <media/v4l2-ctrls.h> | 46 | #include <media/v4l2-ctrls.h> |
@@ -1332,7 +1333,7 @@ static int msi3101_set_tuner(struct msi3101_state *s) | |||
1332 | int ret, i, len; | 1333 | int ret, i, len; |
1333 | unsigned int n, m, thresh, frac, vco_step, tmp, f_if1; | 1334 | unsigned int n, m, thresh, frac, vco_step, tmp, f_if1; |
1334 | u32 reg; | 1335 | u32 reg; |
1335 | u64 f_vco; | 1336 | u64 f_vco, tmp64; |
1336 | u8 mode, filter_mode, lo_div; | 1337 | u8 mode, filter_mode, lo_div; |
1337 | const struct msi3101_gain *gain_lut; | 1338 | const struct msi3101_gain *gain_lut; |
1338 | static const struct { | 1339 | static const struct { |
@@ -1436,8 +1437,10 @@ static int msi3101_set_tuner(struct msi3101_state *s) | |||
1436 | #define F_OUT_STEP 1 | 1437 | #define F_OUT_STEP 1 |
1437 | #define R_REF 4 | 1438 | #define R_REF 4 |
1438 | f_vco = (f_rf + f_if + f_if1) * lo_div; | 1439 | f_vco = (f_rf + f_if + f_if1) * lo_div; |
1439 | n = f_vco / (F_REF * R_REF); | 1440 | |
1440 | m = f_vco % (F_REF * R_REF); | 1441 | tmp64 = f_vco; |
1442 | m = do_div(tmp64, F_REF * R_REF); | ||
1443 | n = (unsigned int) tmp64; | ||
1441 | 1444 | ||
1442 | vco_step = F_OUT_STEP * lo_div; | 1445 | vco_step = F_OUT_STEP * lo_div; |
1443 | thresh = (F_REF * R_REF) / vco_step; | 1446 | thresh = (F_REF * R_REF) / vco_step; |