diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2010-01-10 13:39:45 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:38 -0500 |
commit | 41894b97009adcabc51c6a4943045fd944c46236 (patch) | |
tree | d2f0bb28826c8387c60fde1b964988ec55af4220 | |
parent | 2c1f750ba3fbd4a54544a68b57087bb89f3ba92c (diff) |
V4L/DVB (13987): [STV090x] Quit processing if the tuner did not lock
Exit stv090x_algo() if the tuner did not lock. This might happen due to
missing signal or invalid/incomplete tuning parameters.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/frontends/stv090x.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index cc487f6bdcee..a5bae404701c 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c | |||
@@ -3256,21 +3256,21 @@ static enum stv090x_signal_state stv090x_algo(struct stv090x_state *state) | |||
3256 | 3256 | ||
3257 | msleep(50); | 3257 | msleep(50); |
3258 | 3258 | ||
3259 | if (stv090x_i2c_gate_ctrl(fe, 1) < 0) | ||
3260 | goto err; | ||
3261 | |||
3262 | if (state->config->tuner_get_status) { | 3259 | if (state->config->tuner_get_status) { |
3260 | if (stv090x_i2c_gate_ctrl(fe, 1) < 0) | ||
3261 | goto err; | ||
3263 | if (state->config->tuner_get_status(fe, ®) < 0) | 3262 | if (state->config->tuner_get_status(fe, ®) < 0) |
3264 | goto err_gateoff; | 3263 | goto err_gateoff; |
3265 | } | 3264 | if (stv090x_i2c_gate_ctrl(fe, 0) < 0) |
3266 | 3265 | goto err; | |
3267 | if (reg) | ||
3268 | dprintk(FE_DEBUG, 1, "Tuner phase locked"); | ||
3269 | else | ||
3270 | dprintk(FE_DEBUG, 1, "Tuner unlocked"); | ||
3271 | 3266 | ||
3272 | if (stv090x_i2c_gate_ctrl(fe, 0) < 0) | 3267 | if (reg) |
3273 | goto err; | 3268 | dprintk(FE_DEBUG, 1, "Tuner phase locked"); |
3269 | else { | ||
3270 | dprintk(FE_DEBUG, 1, "Tuner unlocked"); | ||
3271 | return STV090x_NOCARRIER; | ||
3272 | } | ||
3273 | } | ||
3274 | 3274 | ||
3275 | msleep(10); | 3275 | msleep(10); |
3276 | agc1_power = MAKEWORD16(STV090x_READ_DEMOD(state, AGCIQIN1), | 3276 | agc1_power = MAKEWORD16(STV090x_READ_DEMOD(state, AGCIQIN1), |