From 181c2e1c418a536fde236ba9303da19b6fee45f2 Mon Sep 17 00:00:00 2001 From: Andrew de Quincy Date: Sun, 24 Jul 2005 14:45:29 +0000 Subject: Fix SNR reading Signed-off-by: Andrew de Quincey --- linux/drivers/media/dvb/frontends/tda1004x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux/drivers/media/dvb/frontends/tda1004x.c b/linux/drivers/media/dvb/frontends/tda1004x.c index ab0c03247..74cea9f8d 100644 --- a/linux/drivers/media/dvb/frontends/tda1004x.c +++ b/linux/drivers/media/dvb/frontends/tda1004x.c @@ -1046,8 +1046,7 @@ static int tda1004x_read_snr(struct dvb_frontend* fe, u16 * snr) 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); -- cgit v1.2.3