diff options
author | Antti Palosaari <crope@iki.fi> | 2011-11-13 11:22:58 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-24 17:53:35 -0200 |
commit | 8cffcc78996c25a04423e294faa1bb5bba3e420e (patch) | |
tree | 88a698fe6163c8ab6539ffffdb894d78cb536cce /drivers/media/common/tuners/tda18212.c | |
parent | 835bf82ce4b64e280ca6c4da67c819a1065693bc (diff) | |
download | linux-rt-8cffcc78996c25a04423e294faa1bb5bba3e420e.tar.gz |
[media] tda18212: round IF frequency to close hardware value
Chip configures IF frequency resolution of 50 kHz. Round it nearest.
Off-by 50 kHz is almost nothing in real life...
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tda18212.c')
-rw-r--r-- | drivers/media/common/tuners/tda18212.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/common/tuners/tda18212.c b/drivers/media/common/tuners/tda18212.c index b1750d21b486..f52282e6c8bb 100644 --- a/drivers/media/common/tuners/tda18212.c +++ b/drivers/media/common/tuners/tda18212.c @@ -227,7 +227,7 @@ static int tda18212_set_params(struct dvb_frontend *fe, buf[0] = 0x02; buf[1] = bw_params[i][1]; buf[2] = 0x03; /* default value */ - buf[3] = if_khz / 50; + buf[3] = DIV_ROUND_CLOSEST(if_khz, 50); buf[4] = ((c->frequency / 1000) >> 16) & 0xff; buf[5] = ((c->frequency / 1000) >> 8) & 0xff; buf[6] = ((c->frequency / 1000) >> 0) & 0xff; |