From: Andrew de Quincey Date: Fri, 9 Sep 2005 20:02:33 +0000 (-0700) Subject: [PATCH] dvb: frontend: tda1004x: fix SNR reading X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c2026b3af0c8ad33ef253a950c271f2d0da111b6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [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 ab0c032472cc..74cea9f8d721 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);