diff options
Diffstat (limited to 'drivers/media/dvb/frontends/tda10021.c')
-rw-r--r-- | drivers/media/dvb/frontends/tda10021.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index 5ee729846a9f..45137d2ebfb9 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c | |||
@@ -312,7 +312,11 @@ static int tda10021_read_signal_strength(struct dvb_frontend* fe, u16* strength) | |||
312 | { | 312 | { |
313 | struct tda10021_state* state = fe->demodulator_priv; | 313 | struct tda10021_state* state = fe->demodulator_priv; |
314 | 314 | ||
315 | u8 config = tda10021_readreg(state, 0x02); | ||
315 | u8 gain = tda10021_readreg(state, 0x17); | 316 | u8 gain = tda10021_readreg(state, 0x17); |
317 | if (config & 0x02) | ||
318 | /* the agc value is inverted */ | ||
319 | gain = ~gain; | ||
316 | *strength = (gain << 8) | gain; | 320 | *strength = (gain << 8) | gain; |
317 | 321 | ||
318 | return 0; | 322 | return 0; |