From: Johannes Stezenbach Date: Fri, 9 Sep 2005 20:02:34 +0000 (-0700) Subject: [PATCH] dvb: frontend: ves1820: improve tuning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6816a4c183e62bca1fa4812214e483ab503dcb7d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] dvb: frontend: ves1820: improve tuning Reset acgconf register after tuning to improve locking, as suggested by Marco Schluessler. Minor cleanups in ves1820_init(). Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c index 70fb44b391a7..c6d276618e86 100644 --- a/drivers/media/dvb/frontends/ves1820.c +++ b/drivers/media/dvb/frontends/ves1820.c @@ -194,19 +194,18 @@ static int ves1820_init(struct dvb_frontend* fe) { struct ves1820_state* state = fe->demodulator_priv; int i; - int val; ves1820_writereg(state, 0, 0); - for (i = 0; i < 53; i++) { - val = ves1820_inittab[i]; - if ((i == 2) && (state->config->selagc)) val |= 0x08; - ves1820_writereg(state, i, val); - } + for (i = 0; i < sizeof(ves1820_inittab); i++) + ves1820_writereg(state, i, ves1820_inittab[i]); + if (state->config->selagc) + ves1820_writereg(state, 2, ves1820_inittab[2] | 0x08); ves1820_writereg(state, 0x34, state->pwm); - if (state->config->pll_init) state->config->pll_init(fe); + if (state->config->pll_init) + state->config->pll_init(fe); return 0; } @@ -234,7 +233,7 @@ static int ves1820_set_parameters(struct dvb_frontend* fe, struct dvb_frontend_p ves1820_writereg(state, 0x09, reg0x09[real_qam]); ves1820_setup_reg0(state, reg0x00[real_qam], p->inversion); - + ves1820_writereg(state, 2, ves1820_inittab[2] | (state->config->selagc ? 0x08 : 0)); return 0; }