summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2013-12-20 08:11:31 -0200
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-12-20 08:12:39 -0200
commit4bf48150541b5f3335a6438f51b75f9d9d95e256 (patch)
treed4a6778962dfbcefa1cb03eb88267f156e8f2aeb /drivers/media
parentd22d32e117c19efa1761d871d9dab5e294b7b77d (diff)
[media] dib8000: fix compilation error
As reported by kbuild test robot <fengguang.wu@intel.com>: with a random config: drivers/built-in.o: In function `dib8000_get_time_us.isra.16': >> dib8000.c:(.text+0x3075aa): undefined reference to `__udivdi3' Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb-frontends/dib8000.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c
index 7539d7af2cf7..481ee49e6a37 100644
--- a/drivers/media/dvb-frontends/dib8000.c
+++ b/drivers/media/dvb-frontends/dib8000.c
@@ -3951,7 +3951,7 @@ static u32 dib8000_get_time_us(struct dvb_frontend *fe, int layer)
struct dib8000_state *state = fe->demodulator_priv;
struct dtv_frontend_properties *c = &state->fe[0]->dtv_property_cache;
int ini_layer, end_layer, i;
- u64 time_us;
+ u64 time_us, tmp64;
u32 tmp, denom;
int guard, rate_num, rate_denum, bits_per_symbol, nsegs;
int interleaving, fft_div;
@@ -4048,7 +4048,9 @@ static u32 dib8000_get_time_us(struct dvb_frontend *fe, int layer)
/* Estimate the period for the total bit rate */
time_us = rate_denum * (1008 * 1562500L);
- time_us = time_us + time_us / guard;
+ tmp64 = time_us;
+ do_div(tmp64, guard);
+ time_us = time_us + tmp64;
time_us += denom / 2;
do_div(time_us, denom);