summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/drx39xyj
diff options
context:
space:
mode:
authorGianluca Gennari <gennarone@gmail.com>2014-03-11 10:41:47 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-11 10:50:36 -0300
commit90d9c3e1ede2a7d4a0dedfff6e22f46ebd7484c0 (patch)
tree42f103b84d192e3331952c2fe2b5814233cf9d1e /drivers/media/dvb-frontends/drx39xyj
parent5c3112b5beb1005609bf91749c528d32ad7b47f8 (diff)
[media] drx39xyj: fix 64 bit division on 32 bit arch
Fix this linker warning: WARNING: "__divdi3" [media_build/v4l/drx39xyj.ko] undefined! [m.chehab@samsung.com: add include for asm/div64.h] Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/drx39xyj')
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drxj.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index b8c5a851c29e..9482954fd453 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -59,6 +59,7 @@ INCLUDE FILES
#include <linux/init.h>
#include <linux/string.h>
#include <linux/slab.h>
+#include <asm/div64.h>
#include "dvb_frontend.h"
#include "drx39xxj.h"
@@ -12002,13 +12003,16 @@ static int drx39xxj_read_signal_strength(struct dvb_frontend *fe,
static int drx39xxj_read_snr(struct dvb_frontend *fe, u16 *snr)
{
struct dtv_frontend_properties *p = &fe->dtv_property_cache;
+ u64 tmp64;
if (p->cnr.stat[0].scale == FE_SCALE_NOT_AVAILABLE) {
*snr = 0;
return 0;
}
- *snr = p->cnr.stat[0].svalue / 10;
+ tmp64 = p->cnr.stat[0].svalue;
+ do_div(tmp64, 10);
+ *snr = tmp64;
return 0;
}