aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorReinhard Nissl <rnissl@gmx.de>2008-01-21 16:15:14 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 17:53:21 -0200
commit6f6c268b0f1f6846584162053a47d3aadf34a3c4 (patch)
tree29fa3a64c955194aa1989b435bd5e890550c3fb3 /drivers/media/dvb/frontends
parent02ec9d8ff4fba95255c277585aa5d0f33ec3adef (diff)
V4L/DVB (9447): stb6100: improve rounding
Optimization: Round the requested value to achieve a +/-1MHz error instead of +0/-2MHz Signed-off-by: Reinhard Nissl <rnissl@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/stb6100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c
index 0259a468950..5c6d06775dd 100644
--- a/drivers/media/dvb/frontends/stb6100.c
+++ b/drivers/media/dvb/frontends/stb6100.c
@@ -276,7 +276,7 @@ static int stb6100_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth)
else if (bandwidth <= 5000000) /* bw/2 min = 5Mhz for F=0 */
tmp = 0;
else /* if 5 < bw/2 < 36 */
- tmp = bandwidth / 1000000 - 5;
+ tmp = (bandwidth + 500000) / 1000000 - 5;
/* Turn on LPF bandwidth setting clock control,
* set bandwidth, wait 10ms, turn off.