summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/stb6100.c
diff options
context:
space:
mode:
authorManu Abraham <manu@linuxtv.org>2008-01-21 23:15:14 +0400
committerManu Abraham <manu@linuxtv.org>2008-01-21 23:15:14 +0400
commite63a46a970e4722bcbcd2a9958d4c7ea1a2bae2f (patch)
tree4fdefa39315faefcb26df0f6ff5c0cf77ccf04b5 /linux/drivers/media/dvb/frontends/stb6100.c
parentd22b293bacbccd52aac5b48b97a4483b039f7573 (diff)
downloadmediapointer-dvb-s2-e63a46a970e4722bcbcd2a9958d4c7ea1a2bae2f.tar.gz
mediapointer-dvb-s2-e63a46a970e4722bcbcd2a9958d4c7ea1a2bae2f.tar.bz2
Optimization: Round the requested value to achieve a
+/-1MHz error instead of +0/-2MHz From: Reinhard Nissl <rnissl@gmx.de> Signed-off-by: Reinhard Nissl <rnissl@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stb6100.c')
-rw-r--r--linux/drivers/media/dvb/frontends/stb6100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/stb6100.c b/linux/drivers/media/dvb/frontends/stb6100.c
index 90af9000d..a05b68ac7 100644
--- a/linux/drivers/media/dvb/frontends/stb6100.c
+++ b/linux/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.