Fix tune for DVB-C.

Signed-off-by: Evgeny Plehov <evgenyple...@ukr.net>
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c b/drivers/media/dvb-frontends/cxd2820r_c.c
index 125a440..5c6ab49 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;

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to