aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-24 01:29:41 (GMT)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-24 01:29:41 (GMT)
commitaee9cf18e96ed8384a04bd3eda69c7b9e888ee5b (patch)
tree18736052d98c1e95e1663e2607a43a2ef8a1c4a4
parent5b5560842a7ee002d208a20866f88fafd63198eb (diff)
[media] qm1d1c0042: fix compilation on 32 bits
drivers/built-in.o: In function `qm1d1c0042_set_params': >> qm1d1c0042.c:(.text+0x2519730): undefined reference to `__divdi3' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--drivers/media/tuners/qm1d1c0042.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/tuners/qm1d1c0042.c b/drivers/media/tuners/qm1d1c0042.c
index 585594b..2a990f4 100644
--- a/drivers/media/tuners/qm1d1c0042.c
+++ b/drivers/media/tuners/qm1d1c0042.c
@@ -28,6 +28,7 @@
*/
#include <linux/kernel.h>
+#include <linux/math64.h>
#include "qm1d1c0042.h"
#define QM1D1C0042_NUM_REGS 0x20
@@ -234,7 +235,9 @@ static int qm1d1c0042_set_params(struct dvb_frontend *fe)
* sd = b (b >= 0)
* 1<<22 + b (b < 0)
*/
- b = (((s64) freq) << 20) / state->cfg.xtal_freq - (((s64) a) << 20);
+ b = (s32)div64_s64(((s64) freq) << 20,
+ state->cfg.xtal_freq - (((s64) a) << 20));
+
if (b >= 0)
sd = b;
else

Privacy Policy