--- zzzz-none-000/linux-3.10.107/drivers/media/dvb-frontends/cxd2820r_c.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/dvb-frontends/cxd2820r_c.c 2021-02-04 17:41:59.000000000 +0000 @@ -45,6 +45,7 @@ { 0x1008b, 0x07, 0xff }, { 0x1001f, priv->cfg.if_agc_polarity << 7, 0x80 }, { 0x10070, priv->cfg.ts_mode, 0xff }, + { 0x10071, !priv->cfg.ts_clock_inv << 4, 0x10 }, }; dev_dbg(&priv->i2c->dev, "%s: frequency=%d symbol_rate=%d\n", __func__, @@ -64,7 +65,7 @@ } priv->delivery_system = SYS_DVBC_ANNEX_A; - priv->ber_running = 0; /* tune stops BER counter */ + priv->ber_running = false; /* tune stops BER counter */ /* program IF frequency */ if (fe->ops.tuner_ops.get_if_frequency) { @@ -78,7 +79,7 @@ num = if_freq / 1000; /* Hz => kHz */ num *= 0x4000; - if_ctl = cxd2820r_div_u64_round_closest(num, 41000); + if_ctl = 0x4000 - DIV_ROUND_CLOSEST_ULL(num, 41000); buf[0] = (if_ctl >> 8) & 0x3f; buf[1] = (if_ctl >> 0) & 0xff; @@ -167,7 +168,7 @@ start_ber = 1; } } else { - priv->ber_running = 1; + priv->ber_running = true; start_ber = 1; } @@ -258,7 +259,7 @@ return 0; } -int cxd2820r_read_status_c(struct dvb_frontend *fe, fe_status_t *status) +int cxd2820r_read_status_c(struct dvb_frontend *fe, enum fe_status *status) { struct cxd2820r_priv *priv = fe->demodulator_priv; int ret;