From f40ea9829416dcd77a605a2d16a82c115a235cd2 Mon Sep 17 00:00:00 2001 From: Manu Abraham Date: Wed, 17 Jun 2009 23:48:17 +0400 Subject: Fix a redundant compiler warning From: Manu Abraham Signed-off-by: Manu Abraham --- linux/drivers/media/dvb/frontends/stv090x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/frontends/stv090x.c b/linux/drivers/media/dvb/frontends/stv090x.c index 62078400f..fc6e1a42b 100644 --- a/linux/drivers/media/dvb/frontends/stv090x.c +++ b/linux/drivers/media/dvb/frontends/stv090x.c @@ -3405,7 +3405,7 @@ static u8 stv090x_optimize_carloop(struct stv090x_state *state, enum stv090x_mod static u8 stv090x_optimize_carloop_short(struct stv090x_state *state) { - struct stv090x_short_frame_crloop *short_crl; + struct stv090x_short_frame_crloop *short_crl = NULL; s32 index = 0; u8 aclc = 0x0b; -- cgit v1.2.3 From e7002b4ad7d625111ed8894228d81b0032a9ca01 Mon Sep 17 00:00:00 2001 From: Manu Abraham Date: Thu, 18 Jun 2009 11:50:53 +0400 Subject: BUGFIX: An incorrect Carrier Recovery Loop optimization table was being loaded for a given chip version. This would cause the optimization in tuning not to be applied and thus a failed expectation, in tuning speed increment. The patch swaps the tables in use. It also fixes a possible one in a million condition where state->dev_ver implies an older Cut (Cut < 2.0, eventhough the driver doesn't attach to any Cut older than 2.0) or even negative (due to a bad I2C bus master driver) for the card combination. Thanks to Mauro Carvalho Chehab for pointing out the issue at large. From: Manu Abraham Signed-off-by: Manu Abraham --- linux/drivers/media/dvb/frontends/stv090x.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'linux/drivers') diff --git a/linux/drivers/media/dvb/frontends/stv090x.c b/linux/drivers/media/dvb/frontends/stv090x.c index fc6e1a42b..8b152bea3 100644 --- a/linux/drivers/media/dvb/frontends/stv090x.c +++ b/linux/drivers/media/dvb/frontends/stv090x.c @@ -3425,10 +3425,13 @@ static u8 stv090x_optimize_carloop_short(struct stv090x_state *state) break; } - if (state->dev_ver >= 0x30) - short_crl = stv090x_s2_short_crl_cut20; - else if (state->dev_ver >= 0x20) + if (state->dev_ver >= 0x30) { + /* Cut 3.0 and up */ short_crl = stv090x_s2_short_crl_cut30; + } else { + /* Cut 2.0 and up: we don't support cuts older than 2.0 */ + short_crl = stv090x_s2_short_crl_cut20; + } if (state->srate <= 3000000) aclc = short_crl[index].crl_2; -- cgit v1.2.3