Skip to content

Commit

Permalink
V4L/DVB (6818): git-dvb: drivers/media/dvb/frontends/zl10353.c: avoid…
Browse files Browse the repository at this point in the history
… 64-bit divide

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Andrew Morton authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent 6594ad8 commit 18ff605
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/dvb/frontends/zl10353.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 18ff605

Please sign in to comment.