diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-11 19:08:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-11 19:19:30 -0300 |
commit | 7d0ddc91c854f1f42fd7165e259b3573f53c1d73 (patch) | |
tree | b2d5c9332fc101f8c652c85fb2280f21c43f17c6 /drivers/media/dvb-frontends | |
parent | 53cc7c9043f0a68a66e53623b114c86051a7250c (diff) | |
download | blackbird-op-linux-7d0ddc91c854f1f42fd7165e259b3573f53c1d73.tar.gz blackbird-op-linux-7d0ddc91c854f1f42fd7165e259b3573f53c1d73.zip |
[media] tda10071: use div_s64() when dividing a s64 integer
Otherwise, it will break on 32 bits archs.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends')
-rw-r--r-- | drivers/media/dvb-frontends/tda10071.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/tda10071.c b/drivers/media/dvb-frontends/tda10071.c index ee6653124618..119d47596ac8 100644 --- a/drivers/media/dvb-frontends/tda10071.c +++ b/drivers/media/dvb-frontends/tda10071.c @@ -527,7 +527,7 @@ static int tda10071_read_signal_strength(struct dvb_frontend *fe, u16 *strength) unsigned int uitmp; if (c->strength.stat[0].scale == FE_SCALE_DECIBEL) { - uitmp = c->strength.stat[0].svalue / 1000 + 256; + uitmp = div_s64(c->strength.stat[0].svalue, 1000) + 256; uitmp = clamp(uitmp, 181U, 236U); /* -75dBm - -20dBm */ /* scale value to 0x0000-0xffff */ *strength = (uitmp-181) * 0xffff / (236-181); |