From e63a46a970e4722bcbcd2a9958d4c7ea1a2bae2f Mon Sep 17 00:00:00 2001 From: Manu Abraham Date: Mon, 21 Jan 2008 23:15:14 +0400 Subject: Optimization: Round the requested value to achieve a +/-1MHz error instead of +0/-2MHz From: Reinhard Nissl Signed-off-by: Reinhard Nissl Signed-off-by: Manu Abraham --- linux/drivers/media/dvb/frontends/stb6100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/dvb/frontends/stb6100.c') 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. -- cgit v1.2.3