2005-09-04 23:49:53

by Johannes Stezenbach

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

From: Andrew de Quincey <[email protected]>

Fix SNR reading

Signed-off-by: Andrew de Quincey <[email protected]>
Signed-off-by: Johannes Stezenbach <[email protected]>

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);

--