From: Andrew de Quincey Date: Fri, 9 Sep 2005 20:02:33 +0000 (-0700) Subject: [PATCH] dvb: frontend: tda1004x: fix SNR reading X-Git-Tag: v2.6.14-rc1~423 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2026b3af0c8ad33ef253a950c271f2d0da111b6;p=linux-2.6 [PATCH] dvb: frontend: tda1004x: fix SNR reading Fix SNR reading Signed-off-by: Andrew de Quincey Signed-off-by: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c index ab0c032472..74cea9f8d7 100644 --- a/drivers/media/dvb/frontends/tda1004x.c +++ b/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);