[DVB patch 16/54] frontend: tda1004x: fix SNR reading

Johannes Stezenbach
2005-09-04T23:49:53Z

[-- Attachment #1: dvb-frontend-tda1004x-snr-fix.patch --]
[-- Type: text/plain, Size: 753 bytes --]

From: Andrew de Quincey <adq_dvb@lidskialf.net>

Fix SNR reading

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>

drivers/media/dvb/frontends/tda1004x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-2.6.13-git4.orig/drivers/media/dvb/frontends/tda1004x.c 2005-09-04 22:24:24.000000000 +0200
+++ linux-2.6.13-git4/drivers/media/dvb/frontends/tda1004x.c 2005-09-04 22:28:07.000000000 +0200
@@ -1046,8 +1046,7 @@ static int tda1004x_read_snr(struct dvb_
tmp = tda1004x_read_byte(state, TDA1004X_SNR);
if (tmp < 0)
return -EIO;
- if (tmp)
- tmp = 255 - tmp;
+ tmp = 255 - tmp;

*snr = ((tmp << 8) | tmp);
dprintk("%s: snr=0x%x\n", __FUNCTION__, *snr);

--