aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/stb6100.c
diff options
context:
space:
mode:
authorReinhard Nissl <rnissl@gmx.de>2008-01-21 14:15:14 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:21 -0500
commit6f6c268b0f1f6846584162053a47d3aadf34a3c4 (patch)
tree29fa3a64c955194aa1989b435bd5e890550c3fb3 /drivers/media/dvb/frontends/stb6100.c
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/stb6100.c')
-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 0259a4689507..5c6d06775dd5 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)
276 else if (bandwidth <= 5000000) /* bw/2 min = 5Mhz for F=0 */ 276 else if (bandwidth <= 5000000) /* bw/2 min = 5Mhz for F=0 */
277 tmp = 0; 277 tmp = 0;
278 else /* if 5 < bw/2 < 36 */ 278 else /* if 5 < bw/2 < 36 */
279 tmp = bandwidth / 1000000 - 5; 279 tmp = (bandwidth + 500000) / 1000000 - 5;
280 280
281 /* Turn on LPF bandwidth setting clock control, 281 /* Turn on LPF bandwidth setting clock control,
282 * set bandwidth, wait 10ms, turn off. 282 * set bandwidth, wait 10ms, turn off.