diff mbox

drx39xyj: fix 64 bit division on 32 bit arch

Message ID 1394545307-624-1-git-send-email-gennarone@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gianluca Gennari March 11, 2014, 1:41 p.m. UTC
Fix this linker warning:
WARNING: "__divdi3" [media_build/v4l/drx39xyj.ko] undefined!

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
 drivers/media/dvb-frontends/drx39xyj/drxj.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c
index 2352327..0dec073 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drxj.c
+++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c
@@ -12002,13 +12002,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;
 }