From: Daniel Scheller Date: Mon, 9 Apr 2018 16:47:35 +0000 (-0400) Subject: media: dvb-frontends/stv0910: fix CNR reporting in read_snr() X-Git-Tag: Ubuntu-5.0.0-8.9~2293^2~294 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=cea6d2392fde9eec176538cbaee476d76e591028;p=mirror_ubuntu-disco-kernel.git media: dvb-frontends/stv0910: fix CNR reporting in read_snr() The CNR value determined in read_snr() is reported via the wrong variable. It uses FE_SCALE_DECIBEL, which implies the value to be reported in svalue instead of uvalue. Fix this accordingly. Picked up from the upstream dddvb-0.9.33 release. Signed-off-by: Daniel Scheller Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index f5b5ce971c0c..1d96ae9f9f6e 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1326,7 +1326,7 @@ static int read_snr(struct dvb_frontend *fe) if (!get_signal_to_noise(state, &snrval)) { p->cnr.stat[0].scale = FE_SCALE_DECIBEL; - p->cnr.stat[0].uvalue = 100 * snrval; /* fix scale */ + p->cnr.stat[0].svalue = 100 * snrval; /* fix scale */ } else { p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; }