From: Andrew Morton Date: Thu, 13 Dec 2007 00:43:57 +0000 (-0300) Subject: V4L/DVB (6818): git-dvb: drivers/media/dvb/frontends/zl10353.c: avoid 64-bit divide X-Git-Tag: v2.6.25-rc1~1235^2~196 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18ff605a18b29ab1b52d31f96e2ecbaf7a042a3e;p=linux-2.6 V4L/DVB (6818): git-dvb: drivers/media/dvb/frontends/zl10353.c: avoid 64-bit divide Signed-off-by: Andrew Morton Acked-by: Chris Pascoe Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 091fbcced0..e874ec8df6 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c @@ -144,7 +144,8 @@ static void zl10353_calc_nominal_rate(struct dvb_frontend *fe, break; } - value = (bw * (u64)10 * (1 << 23) / 7 * 125 + adc_clock / 2); + value = (u64)10 * (1 << 23) / 7 * 125; + value = (bw * value) + adc_clock / 2; do_div(value, adc_clock); *nominal_rate = value;