From: Antti Palosaari Date: Tue, 15 May 2012 22:48:40 +0000 (-0300) Subject: [media] zl10353: change .read_snr() to report SNR as a 0.1 dB X-Git-Tag: v3.5-rc1~104^2~17 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=13c6a9f706d21fa02495f31b3bbd3ae4d42d108f;p=karo-tx-linux.git [media] zl10353: change .read_snr() to report SNR as a 0.1 dB Report SNR in 0.1 dB scale instead of raw hardware register values. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 4de3691610bc..82946cd517f5 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c @@ -525,7 +525,7 @@ static int zl10353_read_snr(struct dvb_frontend *fe, u16 *snr) zl10353_dump_regs(fe); _snr = zl10353_read_register(state, SNR); - *snr = (_snr << 8) | _snr; + *snr = 10 * _snr / 8; return 0; }