aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Plehov2013-11-09 18:45:41 -0300
committerMauro Carvalho Chehab2013-11-29 12:27:54 -0200
commitf286c2a4faed168843078d1f6fd112bf37dc4902 (patch)
tree8db2254c7bcd0eaaabdc45b7d7050605ba11bd3d
parent648ad154646a899c03a137bd281ff182f5df0d40 (diff)
[media] cxd2820r_c: fix if_ctl calculation
fixes tuning for DVB-C Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/dvb-frontends/cxd2820r_c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends/cxd2820r_c.c
index 125a44041011..5c6ab4921bf1 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/drivers/media/dvb-frontends/cxd2820r_c.c
@@ -78,7 +78,7 @@ int cxd2820r_set_frontend_c(struct dvb_frontend *fe)
num = if_freq / 1000; /* Hz => kHz */
num *= 0x4000;
- if_ctl = cxd2820r_div_u64_round_closest(num, 41000);
+ if_ctl = 0x4000 - cxd2820r_div_u64_round_closest(num, 41000);
buf[0] = (if_ctl >> 8) & 0x3f;
buf[1] = (if_ctl >> 0) & 0xff;